text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Okey kids, follow us through this shortcut 😂.
0non-cybersec
Reddit
Logitech Gamepad F310 interacts with mouse...why?. <p>I downloaded the N64 emulator off of the Software center a while ago, and I was doing OK with using the keyboard. Then a friend of mine gave me the brilliant idea of getting a USB controller. So I got it and it was working fine with the Mupen64Plus, the GFCE Ultra NES, and the ZSNES emulators, until I got the rom for Turok. The controls are different in that game than the others, and utilizes the four yellow "C" buttons that would be on a N64 controller. The Logitech (F310 if it might be useful to know) I got, looks much more like a PS2 or PS3 controller... four buttons on the right, 2 360 directional sticks that push down as a separate button, etc..</p> <p>So Turok uses the four yellow "C" buttons as the main movement for it's character. I don't have so many buttons so I started to mess with using the "U" and "V" axis 360 directional stick. </p> <p>All of a sudden, the controller started to manipulate the cursor, and before I knew it the mouse arrow was sliding to the top left corner of the screen. It wouldn't interact with the controller anymore, and the mouse itself, when moved, would move with great resistance back to the top left corner of the screen. </p> <p>My immediate solution solution was to unplug the controller from the USB.</p> <p>Now, every time I plug the controller back in, it sends the cursor flailing into the corner of my screen.</p> <p>I've looked up getting all sorts of "jscalibrators" and other junk from the Software center and I've typed stuff into the terminal from other forums, postings that asked similar questions, but it's been totally hit or miss... mostly miss.</p> <p>I can't quite figure out what to tell the computer to do to stop thinking the gamepad is the mouse. I been get so frustrated about this over the past two days, I've been taking afternoon naps after researching and fighting for a few hours. </p> <p>Logitech support hung up on me before even connecting me to a human.</p> <p>How do I keep the controller from thinking it's the mouse?</p>
0non-cybersec
Stackexchange
First timer here. Help with food?. So I'm not exactly a "first timer" like the title says. I did do a good bit of "backpacking/camping" in The Marines, but I've been out for seven years now, and it was very different anyway. Even on long trips into the field, we would only carry six or so field-stripped MREs at a time, and would get resupplied almost daily. My situation now is that I haven't camped in forever, and I have no idea how the rest of the community normally does it. The trip is going to be four days, three nights on Alabama's Pinhoti Trail, and we're planning on covering about 65 miles. My initial thought is to carry sixteen dehydrated meals(four per day) and a jetboil, which seems like the only thing to do since we wont have access to vehicles(we're going to drop them off at opposite ends of the trail) for supply runs during the trip. I know it seems like a monotonous meal plan, but it seems like the easiest/lightest way to pack our trash out as well. Are there any other options that I'm not thinking of? What do y'all do for food on four day trips?
0non-cybersec
Reddit
How to avoid total view-hierarchy re-layout when using EditText?. <h2>Background</h2> <p>I have a rather complex layout being shown to the user in an activity.</p> <p>One of the views is an EditText.</p> <p>Since I had to make one of the views stay behind the soft-keyboard, yet the rest above it, I had to listen to view-layout changes (written about it <a href="https://stackoverflow.com/q/34851155/878126"><strong>here</strong></a>).</p> <h2>The problem</h2> <p>I've noticed that whenever the EditText has focus and shows its caret, the entire view-hierarchy gets re-layout. </p> <p>You can see it by either looking at the log of the listener I've created, or by enabling "show surface updates" via the developers settings.</p> <p>This causes bad performance on some devices, especially if the layout of the activity is complex or have fragments that have complex layouts.</p> <h2>The code</h2> <p>I'm not going to show the original code, but there is a simple way to reproduce the issue:</p> <p><strong>activity_main.xml</strong></p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.example.user.myapplication.MainActivity"&gt; &lt;LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"&gt; &lt;TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="just some text"/&gt; &lt;EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:inputType="phone" android:text="write here" android:textSize="18dp"/&gt; &lt;TextView android:layout_width="match_parent" android:layout_height="wrap_content" android:text="just some text 2"/&gt; &lt;/LinearLayout&gt; &lt;/FrameLayout&gt; </code></pre> <p><strong>MainActivity.java</strong></p> <pre><code>public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); findViewById(android.R.id.content).getViewTreeObserver().addOnPreDrawListener(new OnPreDrawListener() { @Override public boolean onPreDraw() { Log.d("AppLog", "onPreDraw"); return true; } }); } } </code></pre> <h2>What I've tried</h2> <p>When disabling the caret (using "cursorVisible", which for some reason is called a "cursor" instead) , I can see that the problem doesn't exist.</p> <p>I've tried to find an alternative to the built-in caret behavior, but I can't find. Only thing I've found is <a href="https://stackoverflow.com/questions/31388810/android-edittext-stop-cursor-blinking-want-a-solid-cursor"><strong>this post</strong></a>, but it seems to make it static and I'm not sure as to how well it performs (performance and compatibility vs normal caret).</p> <p>I've tried to set the size of the EditText forcefully, so that it won't need to cause invalidation of the layout that contains it. It didn't work.</p> <p>I've also noticed that on the original app, the logs can (for some reason) continue being written even when the app goes to the background.</p> <p>I've reported about this issue (including sample and video) <a href="https://code.google.com/p/android/issues/detail?id=200022" rel="nofollow noreferrer"><strong>here</strong></a>, hoping that Google will show what's wrong or a fix for this.</p> <h2>The question</h2> <p>Is there a way to avoid the re-layout of the entire view hierarchy ? A way that will still let the EditText have the same look&amp;feel of normal EditText?</p> <p>Maybe a way to customize how the EditText behaves with the caret?</p>
0non-cybersec
Stackexchange
Professor Oak scolding Jesse and James in the office today..
0non-cybersec
Reddit
Who else thinks Jeffree Star liquid lipsticks smell like root beer?.
0non-cybersec
Reddit
Why is ::operator new[] necessary when ::operator new is enough?. <p>As we know, the C++ standard defines two forms of global allocation functions:</p> <pre><code>void* operator new(size_t); void* operator new[](size_t); </code></pre> <p>And also, the draft C++ standard (18.6.1.2 n3797) says:</p> <blockquote> <p>227) It is not the direct responsibility of operator new or operator delete to note the repetition count or element size of the array. Those operations are performed elsewhere in the array new and delete expressions. The array new expression, may, however, increase the size argument to operator new to obtain space to store supplemental information.</p> </blockquote> <p>What makes me confused is:</p> <p>What if we remove <code>void* operator new[](size_t);</code> from the standard, and just use <code>void* operator new(size_t)</code> instead? What's the rationale to define a redundant global allocation function?</p>
0non-cybersec
Stackexchange
Aphex Twin - Nanou 2.
0non-cybersec
Reddit
How to access Ubuntu running Openfire from the Internet (Public IP)?. <p>I have Openfire installed in my Ubuntu server using port 7070. Now using <a href="http://www.ipchicken.com/" rel="nofollow noreferrer">ipchicken</a> I found my public IP (example: 111.11.000.0/7070). When I try connecting from another PC through connected to the Internet the Ubuntu server is not accessible. </p> <p>How to config the firewall in Ubuntu so that I can access it using the public IP? Please guide me with a step by step example since I am new to Ubuntu.</p>
0non-cybersec
Stackexchange
Reduce blank space between bar button items in UINavigationBar. <p>I notice the blank space between bar button items is quite large. I want to reduce the space to have more room for my title. I tried to create fixed space then added it among the buttons but it didn't work. Does anybody know how to do it?</p> <pre><code>UIBarButtonItem *fixedItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; fixedItem.width = 10.0f; self.navigationItem.rightBarButtonItems = @[settingsButtonItem, fixedItem, speakerButtonItem, fixedItem, favouriteButtonItem]; </code></pre>
0non-cybersec
Stackexchange
org.hibernate.annotations.Entity deprecated in Hibernate 4?. <p>I am attempting to update to Hibernate 4 and I am getting that org.hibernate.annotations.Entity is deprecated. None of the documentation however seems to indicate that this is the case. Anyone have any insight into this?</p> <pre><code>@org.hibernate.annotations.Entity(dynamicUpdate = true) </code></pre>
0non-cybersec
Stackexchange
What is the reason for redirecting the landing page of a site to a URL with &#39;/#/&#39; at the end?. <p>What is the reason for redirecting the landing page of a site to a URL with '/#/' at the end?</p> <p>The system administrators at my company use a Apache reverse proxy, and they always redirect all the external websites to a landing page that ends with '/#/'.</p> <p>For example:</p> <pre><code>https://example.com/springApp/#/ </code></pre> <p>Is there any particular reason for this? I am a technical person, but I can't think of a reason for this. Just curious. NOTE: our website does NOT use page scroll anchors.</p>
0non-cybersec
Stackexchange
Nautilus &quot;context menu&quot; spanish &quot;accent&quot; error. <p>I have installed Ubuntu 16.04 Unity (4.4.0-34-generic x86_64), Spanish Mexico. After install the Nautilus tool "nautilus-image-converter" my context menu on Nautilus shows some grammar (accent) errors on the options of this tools. Other words are correct written on the menu "Im<strong>á</strong>genes" only this "new" options are wrong. Any help will be appreciated. </p> <p><a href="https://i.stack.imgur.com/6GRCS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6GRCS.png" alt="nautilus-image-converter"></a></p>
0non-cybersec
Stackexchange
How to send data to server and fetched response using react native application?. <p>I am trying to learn react native application by making a simple login page using api call. Where I will send user name and password to api and it will give me response. But I can't do it. Well I am sharing my code here.....</p> <pre><code>var myRequest = new Request('&lt;my API &gt;', {method: 'POST', body: '{"username":this.state.uName , "password":this.state.pwd}'}); fetch(myRequest).then(function(response) { alert('Res'+response); }).then(function(response) { alert('Blank'+response); }) .catch(function(error) { alert('Error'+error); }); </code></pre> <p>I think the way of passing my user name and password to server is wrong. Please give me some idea then I can understand what is wrong here.</p>
0non-cybersec
Stackexchange
This took me back to better days, real quick.
0non-cybersec
Reddit
Sony admits its Online Entertainment (SOE) network and Qriocity service were also hacked in addition to PSN, and the hackers got credit and debit card data..
1cybersec
Reddit
Warning sign/exclamation point in red circle next to table names and Query tab?. <p>I have a VPS with CENTOS 6.4 and WHM 11.38.2. I just updated WHM to the latest version, and now when I go to phpMyAdmin there are red circles with white exclamation points in them next to the table names and before the word "Query" in the Query tab.</p> <p>The warning signs are kind of stupid, because there's no message when I hover over them and they aren't clickable. Searching the web and on here for these warning signs didn't produce any results.</p> <p>What do these warning signs mean, and what should I do to fix whatever issue exists?</p> <p>UPDATE:</p> <p>I've been messing around with phpMyAdmin and there's definitely something wrong. When I click on a database name, the tables no longer show in the left pane.</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
TIL farm animals are neutered by disrupting blood-flow to the genitalia with a rubber band until the animal's manhood simply falls of..
0non-cybersec
Reddit
Is there a way I can add points together for the same team in a list?. <p>How can I add the points together for one team?</p> <p>This is what I have tried:</p> <pre><code>def check_league(league_points): league_results = [] for teams in league_points: team, points = teams.strip().rsplit(' ', 1) print(team, points) </code></pre> <p>This is the list I have:</p> <pre><code>['Lions 1', 'Snakes 1', 'Tarantulas 3', 'FC Awesome 0', 'Lions 1', 'FC Awesome 1', 'Tarantulas 3', 'Snakes 0', 'Lions 3', 'Grouches 0'] </code></pre> <p>Output:</p> <pre><code>('Lions', '1') ('Snakes', '1') ('Tarantulas', '3') ('FC Awesome', '0') ('Lions', '1') ('FC Awesome', '1') ('Tarantulas', '3') ('Snakes', '0') ('Lions', '3') ('Grouches', '0') </code></pre> <p>I want the output to be:</p> <pre><code>'Tarantulas', '6' 'Lions', '5' 'FC Awesome', '1' 'Snakes', '1' 'Grouches', '0' </code></pre>
0non-cybersec
Stackexchange
Finding kernel of a column matrix. <p>I've got a matrix and linear mapping problem, giving me vector $v_1$ as \begin{bmatrix} 1\\ 0\\ 1\\ \end{bmatrix}</p> <p>and $v_2$ as \begin{bmatrix} 0\\ 1\\ 1\\ \end{bmatrix} also, it gives me the mapping $f(x)=(x,v_1)v_1+(x,v_2)v_2$ while $x\in\mathbb{R}^3$ and the expression $(x,v_i)$ is dot product of $x$ and vector $v$</p> <p>the problem asks me to find the basis of kernel of $f(x)$</p> <p>so, I start thinking from $f(x)$. as dot product of vectors give scalar and I assume $x$ as \begin{bmatrix} x_1\\ x_2\\ x_3\\ \end{bmatrix} I'll get $f(x) = (x_1+x_3)\begin{bmatrix} 0\\ 1\\ 1\\ \end{bmatrix} + (x_2+x_3) \begin{bmatrix} 0\\ 1\\ 1\\ \end{bmatrix}$</p> <p>and do the multiplication to get $f(x)=\begin{bmatrix} 1 &amp; 0\\ 0 &amp; 1\\ 1 &amp; 1\\ \end{bmatrix}\begin{bmatrix} x_1+x_3\\ x_2+x_3\\ \end{bmatrix}$</p> <p>and finally $f(x)=\begin{bmatrix} x_1+x_3\\ x_2+x_3\\ x_1+x_2+2x_3\\ \end{bmatrix}$</p> <p>then to find kernel I should take the matrix equal to $0$ and find the kernel but I cannot find it</p>
0non-cybersec
Stackexchange
Legend.
0non-cybersec
Reddit
Sunspot AR1538 from NASA's Solar Dynamics Observatory = Amazing!.
0non-cybersec
Reddit
mdframed causes &quot;too many floats&quot; error. <p>I defined a new environemnt <code>examples</code> for a book I am writing. I would like examples to be with a framed grey box, and use the following construct</p> <pre><code>%---------------------------------------------------------------------------- % EXAMPLES %---------------------------------------------------------------------------- \newlistof[chapter]{examples}{exp}{\listexamples} \newcommand{\bex}[1]{% \begin{mdframed}[linewidth=2, leftmargin=0, rightmargin=0, backgroundcolor=gray, linecolor=black, splittopskip=\topskip, skipbelow=\baselineskip, skipabove=\baselineskip] \refstepcounter{examples} \par\noindent\sqrblt\underline{\textbf{Example \theexamples. #1}} \addcontentsline{exp}{examples} {\protect\numberline{\theexamples}#1}\par} \cftsetindents{examples}{0em}{2em} % for example numbers which are greater than 9 % Solution \newcommand{\sol}{\begin{center}\underline{{\bf Solution:}}\end{center}} % End of Example \newcommand{\eex}{ \noindent \hbox{~~}\hfill \hbox{~~} \sqrblt \end{mdframed} } </code></pre> <p>If I activate the <code>mdframed</code>, I get "not in outer par mode". If I comment the <code>mdframed</code> part, all is well</p>
0non-cybersec
Stackexchange
OpenVPN strange behavior. <p>I have a KVM VPS for my personal VPN. Server running on FreeBSD 11.0-RELEASE-p1 with OpenVPN 2.4.0, and ipfw kernel nat. Direct connection speed between me and VPS ~10-12 Mbps. Via tunnel speed is ~1.6-5 Mbps (which enough for me).</p> <p>This tunnel is for web surfing. When I download file from server via tunnel everything fine. But when I try to open some web page, speed is 2-7kbps!! <strong>EXCEPT</strong> youtube! Youtube always works fast and shows videos in 1080p with no freezes.</p> <p>I tried different combinations of tcp/udp, cipers, sndbuf/rcvbuf, tun-mtu/mssfix, comp-lzo/compress lz4-v2/no compress, different TAP drivers, Windows 7 64/Ubuntu with no luck.</p> <p>OpenVPN server conf:</p> <pre><code>port 3344 proto udp dev tun ca ca.crt cert gate.crt key gate.key dh dh.pem server 10.80.50.0 255.255.255.240 ifconfig-pool-persist ipp.txt client-config-dir ccd route 10.80.50.0 255.255.255.240 push "redirect-gateway def1 bypass-dhcp" push "dhcp-option DNS 10.80.50.1" keepalive 10 120 tls-authta.key 0 cipher AES-256-CBC max-clients 3 user nobody group nobody persist-key persist-tun status /var/log/openvpn-status.log log /var/log/openvpn.log verb 6 askpass keyp auth-nocache sndbuf 393216 rcvbuf 393216 push "sndbuf 393216" push "rcvbuf 393216" </code></pre> <p>Client conf</p> <pre><code>dev tun proto udp remote remove_vps 3344 client resolv-retry infinite ca ca.crt cert client1.crt key client1.key tls-auth ta.key 1 remote-cert-tls server persist-key persist-tun verb 3 cipher AES-256-CBC askpass keyp auth-nocache </code></pre> <p>IPFW:</p> <pre><code>allow ip from any to any via lo0 nat 1 ip from 10.80.50.6 to any out via vtnet0 nat 1 ip from any to $wanip in via vtnet0 allow ip from any to any via tun0 allow ip from any to any deny log logamount 5 ip from any to any deny ip from any to any </code></pre> <p>Can somebody help me to figure out where is the problem ?</p>
0non-cybersec
Stackexchange
Solving Addition Rule other way. <p>I know the General Addition Rule for Two Events is </p> <blockquote> <p>$$P (A\cup B) = P (A) + P(B) - P(A\cap B)$$</p> </blockquote> <p>I know the proof where ${R_1} = A\cap B, R_2 = A\cap B', R_3 = A'\cap B,$ and $R_4 = A'\cap B'.$ The $R_i$'s are a partition of a sample space S and they are disjoint.</p> <p>However I was wondering if we can prove this by making use of the set equations:</p> <p>$A\cup B =A\cup(A'\cap B) $(I know the RHS is disjoint) and<br> $B = (A\cap B)\cup(A'\cap B) $(where the RHS is disjoint).</p> <p>How would one go proving the theorem using these set equations? Can someone please show me? </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
WAKE THE FUCK UP: Early Risers "Football is Here" Thread (Thanksgiving edition). Wake up fatties. Snow on the ground, feels like Christmas BUT football in <4.5 hours. Start stuffing yourselves. If you don't consume at least ten thousand calories today you're doing it wrong. Discuss all things related to football, food and liquor. Happy Thanksgiving!!!
0non-cybersec
Reddit
Has anyone ever had a worthwhile affair?. As per the title, has anyone ever had an affair they felt they strengthened their main relationship for one reason or another? Anyone have on-going affairs and perfectly happy main relationships? Why do you do it, if you're happy? For the sex? For the excitement? There's always the advice "it will always come out", but that isn't true. A friend i know of 17 years has a wonderful wife, and great kids but recently revealed to me that his secret to success was having an affair on occasion. He said they'd be going through some problem or other, he'd go out and have a fling of some sort and it would often provide him with the energy or desire to put renewed effort into his marriage. I tried to argue with him about the morality, but then i thought this guy has the kind of marriage i can only dream of. Seriously, they are mostly happy together, she's happy, he's happy and before someone comes along and says "oh no they can't possibly be" let me stop you, they aren't fake happy. I know both of them well and can tell instantly when they're faking happiness for the benefit of others. While i know it's "wrong" to cheat i have to start asking myself, if it's working so well for this guy and his family maybe other cheaters are just doing it wrong? How are we to know that for every one cheater who lazily cheats with his wife's best friend there aren't 10 more who are tactful enough to use protection with an escort at least 5 hours away from his home? My ethical side and my rational side are at odds. Someone give me something to work with here?
0non-cybersec
Reddit
Illegal Alien Who Sexually Assaulted Girl, Attacked Woman In Same Day, Freed On Bond United States Illegal Alien Crime Report.
0non-cybersec
Reddit
pacemaker failover nginx only once. <p>I setup a cluster with two nodes with pacemaker 1.1.10 on CentOS 7. Then I downloaded a <a href="https://github.com/ClusterLabs/resource-agents/blob/master/heartbeat/nginx" rel="nofollow noreferrer">resource agent for nginx from github</a></p> <p>I tested my setup like this:</p> <ol> <li>Node 1 is started with the nginx and vip, everyting is ok</li> <li>Kill Node1 nginx, wait for a few seconds</li> <li>See the ngnix and vip are moved to node2, failover succeeded, and Node1 doesn't have any resources active</li> <li>I kill nginx on node2, but nginx and vip don't come back to Node1</li> </ol> <p>I set <code>no-quorum-policy="ignore"</code> and <code>stonith-enabled="false"</code>.</p> <p>Why won't pacemaker let the resource come back to Node1? What did I miss here? </p>
0non-cybersec
Stackexchange
Is it possible to represent MySQL database as text files?. <p>I find manually editing MySQL databases tedious.</p> <p>If the whole database was optionally represented as text files (as per Unix "everything is a file") for quick manually edits, searching and replacing would be much simpler.</p> <p>Is it possible to represent MySQL database as text files?</p> <p>Background:</p> <p>A user asked to get something deleted from the forum database. Haven't found out how to search and delete it.</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
[Vent] Found a dog. Got him all fixed up. Spay and neuter place took him away.. So about 6 weeks ago we found an awesome dog. He was way under weight and had two kinds of worms and covered in fleas. The end of his tail had rotted and needed to be removed. We took him to a vet and asked them to check for a chip and they said there wasn't one and he had no collar when we found him. We then spent about $2,500 on him between vet bills, food and supplies. Yesterday, we took him to a place in town that does neutering. We said we would like to get him chipped as well. They called us and said he already had a chip and that his old owner will pick him up now. We were floored. I left work for some day drinking and tears. They said the previous owner said the tail happened in an accident with the doggy door (which it seems like they must have just ignored it then). They also said they lost him 3 weeks before we found him. It really seemed like he looked pretty bad for being gone only 3 weeks. I just hope he is taken care of. We really fell in love with that dog. We took him everywhere. Farewell buddy! http://imgur.com/a/1T61r. Edit: Corrected some spelling. Edit: I am not going to try and get the dog back or my money. Just sad that he is gone. I learned a lesson about taking in strays. Edit: Thanks for all your replies! This has been really good for dealing with it by hearing all of your input on the matter.
0non-cybersec
Reddit
Anyone seen Goldie?.
0non-cybersec
Reddit
Word 2016 equation font keeps auto-resetting to Hindi fonts. <p>In Word 2016, when I insert an equation, it shows it to me correctly.</p> <p>However, when I save the document and re-open it, the font gets automatically changed to Hindi fonts. Each time I change the font and save the document and then re-open it, it keeps going back to Hindi.</p> <p>My default office language is set to English.</p> <p>I have tried uninstalling the Hindi fonts but to no avail. When I uninstall one font, it just picks up another Hindi font.</p> <p>I have also tried reinstalling Word itself, but that too didn't help.</p> <p>Please guide what should I do to change the default equation language. I have become somewhat frustrated with this problem since the last many months.</p>
0non-cybersec
Stackexchange
Android autocomplete with SQLite LIKE works partially. <p>I have a <code>Restaurants</code> table in my SQLite DB that have the following records</p> <pre><code>| Name | Latin_Name | +--------+------------+ | Манаки | Manaki | +--------+------------+ | Енрико | Enriko | +---------------------+ </code></pre> <p>Now I'm doing the search like this:</p> <p>From my fragment:</p> <pre><code>String selection = DBHelper.COL_NAME + " LIKE ? OR " + DBHelper.COL_LATIN_NAME + " LIKE ?"; String[] selectionArgs = {"%"+term+"%", "%"+term+"%"}; CursorLoader loader = new CursorLoader(getActivity(), DatabaseContentProvider.REST_CONTENT_URI, columns, selection, selectionArgs, null); </code></pre> <p>The content provider <code>query</code> method:</p> <pre><code> public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) { db = dbHelper.getReadableDatabase(); SQLiteQueryBuilder builder = new SQLiteQueryBuilder(); switch(URI_MATCHER.match(uri)){ case REST_LIST: builder.setTables(DBHelper.REST_TABLE); break; case REST_ID: builder.appendWhere(DBHelper.COL_ID + " = " + uri.getLastPathSegment()); break; default: throw new IllegalArgumentException("Unsupported URI: " + uri); } Cursor cursor = builder.query(db, projection, selection, selectionArgs, null, null, sortOrder); cursor.setNotificationUri(getContext().getContentResolver(), uri); return cursor; } </code></pre> <p>So pretty basic right? Now here comes the problem:</p> <p>If the <code>term</code> that comes in is <strong><code>en</code></strong> I can see the <em>Enriko</em> restaurants among the others.</p> <p>If I pass <strong><code>enri</code></strong> I can't see the <em>Enriko</em> as a result anymore.</p> <p>Same goes for the <em>Manaki</em> restaurant I can see it until <strong><code>mana</code></strong> and after that (for <strong><code>manak</code></strong> term for ex) I can't see it in the results list.</p> <p>I was debugging my ContentProvider and I realized that the cursor was empty, so the problem have to be at the database level, I guess.</p> <p>Please help.</p> <p><strong>UPDATE:</strong></p> <p>Having the @laalto comments in mind I decided to do some test on the database. In the <code>onCreate()</code> method of my <code>SQLiteOpenHelper</code>I inserted only those two records in the table by hand and it worked.</p> <p>Now the problem is that I have to insert 1300 records <code>onCreate()</code> from a <code>json</code> file shipped in the <code>assets</code> folder. Right now I'm parsing the <code>json</code> file create an <code>ArrayList&lt;Restaurant&gt;</code> then loop trough it and insert one record per object for all 1300 items. </p> <p>That kind of insertion won't work with the SQLite <code>LIKE</code> method. </p> <p>Are there any gotchas about this kind of populating the database? </p> <p>Maybe I need to change file encoding (it is UTF-8 now) or maybe database's collation, or maybe <code>getString()</code> from <code>JSONObject</code> can be tweaked for the database?</p>
0non-cybersec
Stackexchange
Regex in LibreOffice Writer - finding &quot;everything&quot; but one thing. <p>I have a text (html code) and need to find <code>&lt;p&gt;</code> tags with their classes, id, styles (if any) etc. I'm doing this using the following regexs: <code>&lt;p(.*?)&gt;</code> or <code>(&lt;p([^&gt;]+))&gt;</code></p> <p>The pattern of my text is here:</p> <pre><code>&lt;p class="navi_buttons"&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/p&gt; &lt;p class="reg"&gt;Aliquam mi sapien, rutrum eget sem vel, semper efficitur.&lt;a href="xyz.html" class="topiclink"&gt;vitae velit&lt;/a&gt;&lt;/p&gt; &lt;p class="THIS_SHOULD_BE_AVOIDED"&gt;Donec fringilla sapien vitae interdum volutpat.&lt;/p&gt; &lt;p class="nav"&gt;Cras nec orci non dolor ultrices luctus sit amet vitae velit.&lt;/p&gt; </code></pre> <p>The problem is that I need to find every occurrence of <code>&lt;p&gt;</code> tag except one certain class (i.e. I want to avoid paragraphs of this class). I don't know how to write an exclusion that is treated as a string, not a set of the individual characters. I would appreciate your help. Kind regards,</p>
0non-cybersec
Stackexchange
3Com Switch Fan Fault &quot;Approve&quot;. <p>I have a second hand 3Com 4200G 24 Port Switch. I have opened the case and unplugged one of the two case fans. I am not running the switch at anywhere near its full capabilities so I am comfortable disabling a fan.</p> <p>As expected the power light is red and the small seven segment display reads F to show a fault. But I kind of want the display to show the unit number for easier troubleshooting when I have my other switches.</p> <p>Is there any way to "Approve" a fault in the switches web interface so that the display resumes normal operation or should I be putting a resistor across a certain two fan connector pins so the unit thinks the fan is working?</p> <p>Thanks in advance. :-)</p>
0non-cybersec
Stackexchange
Cannot update grub with parameters on live USB. <p>I have booted from a live USB ("Try Ubuntu"), that also has a persistent option set (I used <a href="http://www.linuxliveusb.com/" rel="noreferrer">LiLi</a> to create one) to do some tests for <a href="https://askubuntu.com/questions/153813/crippling-repeating-pciehp-card-not-present-notifications">this pcie hotplug issue I'm having</a>.</p> <p>I'm trying to test <a href="https://help.ubuntu.com/community/ExpressCard" rel="noreferrer">some boot paramaters</a> (like <a href="https://askubuntu.com/questions/19486/how-do-i-add-a-boot-parameter">in this question</a>) by doing this</p> <pre><code>sudo nano /etc/default/grub sudo update-grub </code></pre> <p>The problem is that that last command gives me this:</p> <pre><code>/usr/sbin/grub-probe: error: failed to get canonical path of /cow. </code></pre> <p>It looks like <code>/cow</code> is the file-system that is mounted on <code>/</code>, according to:</p> <pre><code>:~# df Filesystem 1K-blocks Used Available Use% Mounted on /cow 4056896 2840204 1007284 74% / udev 1525912 4 1525908 1% /dev tmpfs 613768 844 612924 1% /run .... </code></pre> <p>Is there a way for me to run update-grub?</p>
0non-cybersec
Stackexchange
Walked into my hotel room and found this.
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
Cracked screen on HP Chromebook x360 - Model # 14-DA0012DX. <p>I have a HP Chromebook x360 14&quot; touchscreen (product 7UL19UA, model 14-DA0012DX) that has a cracked screen. I posted a question in HP’s forum but didn’t get much help. How do I know if just the digitizer/touchscreen is cracked or if the LCD screen is also cracked? Do I replace them individually or is there a part that includes both the digitizer and screen? I looked in the manual and it makes reference to a display assembly (part number L36904-001 - &quot;HU LCD 14'INCH FHD BV LED UWVA&quot;). Is that the part I need and does that part include both the digitizer/touchscreen and the LCD screen? I’m having trouble finding the part as it’s not offered through HP.</p>
0non-cybersec
Stackexchange
ASUS just posted this up. That cinematic feel!.
0non-cybersec
Reddit
Emergency lane is blocked and the ambulance cannot pass through!.
0non-cybersec
Reddit
Anyone take 'under-the-radar' supplements that aren't mainstream, but swear by them?. Pretty much everybody recommends Fish Oil, Vitamin D, Multivitamins, etc. as supplements to take, but there has to be more quality stuff out there than just these guys. So essentially, what are you taking that you think not many people are, and for what reasons? For me; CoQ10, Chromium, and Fucoxanthine. (EDIT: Vinpocetine) CoQ10: I believe this to be the most underrated supplement, as there is a lot of evidence on it's heart health yet a shit-ton of anecdotal evidence for well-being. Even many abstracts have noted that 'patients reported increased feelings of well-being'. It's bioelectric involvement in the Mitochondria makes it theoretically a godsend, and it appears to, in part, have these effects. Chromium: Not many people take care of their blood sugar, sad. I also put cinnamon in my protein shakes, but that stuff can't go on everything. Fucoxanthine: Is a 'promising but needs more evidence supplement', not many studies done on it, but they all seemed to be positive. Tried it out and it is now going to be a mainstay in my fat loss regimes in the future. In short it just converts more energy to heat in the body, so it is released as heat rather than stored; not too significant, but it builds up over the course of 2 months or so to be pretty nice. (EDIT: Vinpocetine: Take care of your brain, it is your most important organ. Neural antioxidant + Neural vasodilator + Reperfusion-protection agent + cheap.) So r/fit, lets hear what unorthodox supplements you swear by! (Pre-emptive strike: To anyone who says that supplements can't replace a healthy diet, well, no shit Sherlock. They can be fun to experiment with and can exert effects in isolation or superphysiological doses that can't be matched by foods though)
0non-cybersec
Reddit
apache removes the first / from url. <p>For example, <code>https://subdom.mysite.com/contact_us/</code> --> <code>https://subdom.mysite.comcontact_us/</code> </p> <p>These are the only rewrite rules that I have:</p> <pre><code>RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^(.*)$ /#/$1 [L] </code></pre> <p>Some background: I'm using an apache webserver to host an angularjs 1.6 web application. Changing the last two lines seems to break the webapp, in the sense that I can't reload the page anymore..</p> <p>I've read <a href="https://stackoverflow.com/questions/20042434/why-is-apache-permanent-redirect-removing-the-slash-between-the-domain-and-the-p">this question</a>, but their issue stemmed from http urls, which isn't the case here.</p> <p>Here are the server logs:</p> <blockquote> <p>[Tue Aug 13 18:20:18.897503 2019] [suexec:notice] [pid 1] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) <br> [Tue Aug 13 18:20:18.924270 2019] [lbmethod_heartbeat:notice] [pid 1] AH02282: No slotmem from mod_heartmonitor <br> [Tue Aug 13 18:20:18.938867 2019] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.33 configured -- resuming normal operations <br> [Tue Aug 13 18:20:18.938916 2019] [core:notice] [pid 1] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND' <br> - - [13/Aug/2019:18:20:43 +0000] "GET /contact_us HTTP/1.1" 302 357 <br> [13/Aug/2019:18:20:43 +0000] TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "GET /contact_us HTTP/1.1" 357 <br> - - [13/Aug/2019:18:20:46 +0000] "GET /contact_us HTTP/1.1" 302 228</p> </blockquote>
0non-cybersec
Stackexchange
SQL Server 2008 stopped receiving network connections after SP2 installed. <p>After SP2 I was unable to connect to SQL Server 2008. I found that the SQL&nbsp;Server Browser service was stopped. I enabled Browser, but it did not help. Everything was fine before SP2. My OS is Windows 7 64-bit.</p> <p>Protocols for SQL&nbsp;Server: Enabled Shared memory, Named pipes and TCP/IP</p> <p>Under TCP/IP, all settings seem OK.</p> <p>A connection fails from the local network to this computer, but otherwise the server is working OK.</p>
0non-cybersec
Stackexchange
14 Glass Panes. WWYD? (came out of a door).
0non-cybersec
Reddit
IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 ISSN (Online): 1694-0784 ISSN (Print): 1694-0814 44 ICT in Universities of the Western Himalayan Region in India: Status, Performance- An Assessment Dhirendra Sharma1 and Vikram Singh2 1University Institute of Information Technology, Himachal Pradesh University, Shimla, Himachal Pradesh 171 005, India. 2Department of Computer Science and Engg, Ch. Devi Lal University, Sirsa, Haryna 125 055, India. Abstract The present paper describes a live project study carried out for the universities located in the western Himalayan region of India in the year 2009. The objective of this study is to undertake the task of assessment regarding initiative, utilization of ICT resources, its performance and impact in these higher educational institutions/universities. In order to answer these, initially basic four- tier framework was prepared. Followed by a questionnaire containing different ICT components 18 different groups like vision, planning, implementation, ICT infrastructure and related activities exhibiting performance. Primary data in the form of feedback on the five point scale, of the questionnaire, was gathered from six universities of the region. A simple statistical analysis was undertaken using weighted mean, to assess the ICT initiative, status and performance of various universities. In the process, a question related to Performance Indicator was identified from each group, whose Coefficient of Correlation was calculated. This study suggests that a progressive vision, planning and initiative regarding academic syllabi, ICT infrastructure, used in training the skilled human resource, is going to have a favourable impact through actual placement, research and play a dominant role at the National and International level. Keywords: Information and Communication Technology (ICT), Initiative, Status, Performance, Assessment, Impact, Performance Indicator. 1. Introduction During the past decade there has been a very rapid development in activities related to Information and Communication Technology (ICT), (Sadagopan 1998), in various Universities and Institutions of higher learning. Such a transformation was triggered by more and more awareness of microwaves and tele-communication. Its pervasiveness has affected almost all fields from micro- to astronomical level via class rooms. ICT in respective fields makes education extremely effective, efficient and engaging due to its power of problem solving and application. The impetus at the national level was set in motion by the Task Force ‘Technology Information Forecasting and Assessment Council’ (TIFAC), for Technology Vision 2020. One of the important pilot documents “India 2020, A Vision: for the New Millennium” (1998) prepared by Technology Information Forecasting and Assessment Council (TIFAC), under the leadership of Dr. A.P.J.Kalam, provided a blue print of the `Technology Vision for India’. According to this document ICT can enhance critical thinking, information handling skills, level of perception, problem solving capability and adding value to research in educational institutions. It not only highlighted the importance of higher educational institutions/ universities to take prompt and appropriate initiatives in this direction, but has given further direction for planning ICT strategies in which the role of higher educational institutions in India is going to be very crucial. It emphasized that the Indian human resource has great learning capabilities with a core competence in technology along with the spirit of entrepreneurship and competitiveness. It strongly advocated the development of human resource cadre and the role of higher educational Institutions that will be the foundation of the technological advancement in the country. This prompted Government of India to take a major ICT initiative to lay down the ICT policy for whole of the country, which is reflected in the planning and implementation by the Ministry of Human Resource Development (MHRD) at various levels particularly through higher educational institutions/ universities of the country. At the national level, it is being implemented IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 45 vigorously in the form of e-governance and is being coordinated by National Informatics Centers (NIC) throughout the country. University Grants Commission (UGC), All India Council of Technical Education, Department of Science & Technology (DST), and the Indian Council of Agricultural Research (ICAR) are also encouraging higher education Institutions and Universities in this direction. Latest telecommunication policy (Tandon 2002) is quite consistent with the initiatives mentioned above. In Jan. 2009, the Cabinet Committee on Economic Affairs, Government of India, gave its approval for a new scheme by the name of National Mission on Education through Information and Communication Technology (NMEICT) submitted by the MHRD, Govt. of India, for the 11th Five Year Plan. This mission has been envisaged to leverage the potential of ICT, in providing high quality personalized and interactive knowledge modules for all the learners in higher education institutions in ‘any time any where mode’. Further, it has to ensure on-line access to all the ICT resources viz. e- contents, the connectivity and virtual laboratories, to 18,000 colleges and all the universities of the country and thus to bridge the digital divide. There has been another body, National Association of Software and Services Companies (NASSCOM), in the field of ICT, dealing with the ICT infrastructure, research & development and trade since 1988. According to recent report of NASSCOM (Strategic Review-2009), it has emphasized the availability of skilled and employable talent. In order to achieve this concentrated effort to enhance talent availability and quality are needed from all the concerned sections namely the government academia and the industry. The role of academia is supposed to be very critical in setting up research laboratories. Specific initiatives like faculty development program, upgrading the curriculum, launching internship program and academia- industry collaboration can help to bridge the gap towards the development of talent. NASSCOM is particularly interested in the ICT- business process outsourcing (ICT-BPO) industry in India, which has become a grown economy of the country. Further, this body is a partner with the government of India and various state governments of the country. It has also played a crucial role in the formulation of ICT policies which endeavors to narrow down the digital divide in the country and enables all citizens to enjoy the benefits of ICT. At the international level, United Nations Educational, Scientific and Cultural Organization UNESCO (2007- 08) has also prepared a document for Asia– Pacific countries, for the implementation of ICT programs through the higher educational institutions. Various ICT strategies of driving the higher education towards excellence in ICT is described in the above document, in support of the core areas of higher education. i.e., learning, teaching, research and training programs. All these innovative ideas could propagate through the concept of diffusion and adoption. It seems that adoption of the latest information and communication technology is making all the difference particularly in the universities. During the last two decades there has been several attempts to understand information technology diffusion. At the empirical level, the concept of diffusion was reviewed by Fichman in 1992. He has dwelled upon innovation diffusion theory, in particular, how to improve technology assessment, adoption and implementation. A framework was discussed in terms of classical diffusion adopted mainly by individuals and organizations alongwith achieving critical mass beyond which the innovation is universally adopted. A lot of scientific work exists on the diffusion of innovation and its adoption given by Attewell (1992), Rogers (1995), Farquhar & Surry (1994), Anderson et al (1998) and Wilson et al (2000). Attewell (1992) put the work on diffusion in two categories a) Adoption studies and b) Macro diffusion studies. The former is primarily concerned with understanding of innovations and its assimilation during a time of adoption. The latter is concerned with characterizing the rate a pattern of adoption of technology. This type of work was understood in terms of mathematical models of the diffusion process by Mahajan & Peterson (1985) and Mahajan et al. (1990). Innovation diffusion has also been understood in terms of mathematical approaches given by Karmeshu and Pathria (1980), Lal et al (1988), Karmeshu et al (1992) and by Karmeshu and Jain (1995). In recent years, a very significant work on ‘Global Diffusion of the Internet’ by Wolcott and Goodman (2003) appeared in Indian context. Walcott and Goodman (2003), presented a vision of new India as a measure of IT power, fully integrated with a global economy. The key to this vision was obviously the internet for enabling the technology based changes. They provided an analytical framework which broadly consisted of dimensions and determinants. Dimensions contained six variables namely organizational infrastructure, geographic dispersion, connectivity infrastructure, pervasiveness, sectoral absorption and sophistication of use. These variables are supposed to capture the state of internet within a country at a given point of time. Each of these variables was judged at five different levels. Determinants represent various factors, to understand the observation of the “state”. While discussing the IT action plan, they further elaborated on distinctive features of the internet in India, IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 46 for a continued dynamic growth, in three steps (a) The government policy (b) The nature of relationship between the government, the state owned telecommunications service providers and private sectors as a critical variable. (c) The policy makers try to strike a balance between the interest of the society and those of individuals. Later, this framework has been applied to understand the initiative, status and performance in Ghana by Foster, et al (2004) in Togo by Bernstien and Goodman (2005) and in Kenya by Ochara et al (2008). Such a comprehensive analysis was carried out in a broader context at the national level for different countries. In view of the above initiatives from different quarters, most of the universities and higher educational institutions have started adopting the latest technology, focusing on the development of the skilled human resource, as part of its responsibility, in the field of ICT, encompassing all the disciplines, particularly in technical fields, productively and constructively. Most of the universities are undertaking the job of training the technical personnel’s in the respective specializations or in the area of its excellence. These programs have been going on for the last almost one decade. Almost after a decade, one may wonder how efficient the system, particularly the university/higher educational institutions has become. Initiatives to have an assessment of ICT infrastructure, its utilization and overall performance and efficiency, of any higher educational institution, are quite essential, in identifying, planning and achieving the ICT strategies at the respective levels. Essentially, this has formed the basis of motivation to undertake the study of the ICT initiatives, status and its academic performance in various universities in the western Himalayan region of the country and then to analyze, using simple statistical methods, the ICT based academic/ technological status and performance of different universities, and assess in a comparative manner, their vision, planning, initiative, status activities and impact. The University Grants Commission (UGC), New Delhi, took steps to establish an autonomous institution, National Assessment and Accreditation Council (NAAC), for comprehensive assessment of various universities and to place them according to certain ranking. NAAC (2007) has developed a framework for higher education based on the promotion and sustenance of quality of teaching- learning, research and training programs. Their most significant core value is quest for excellence/ innovations using the latest technological trends and fostering global competence among students. They have devised seven assessment criteria namely, curricular, teaching- learning, research & application, innovative, infrastructure, student support and leadership/governance, aspects, to capture the micro- level quality indicators by using differential weightages. Some other national agencies TOI group 2007, also tried to assess, independently, various agriculture, horticulture and technical institutions. These recommendations and respective gradations are available at the national level. This information may be utilized for comparison with the findings of this paper in the context of ICT. Recently Mokhtar et al (2007), presented the state of academic computing in Malaysian colleges in which they tired to answer the central questions regarding indicators of assessments and performance of academic computing. They adopted the value chain concept originally proposed by Porter (1985), in connection with some business idea, to describe the relationship between academic ICT activities. This framework consisted of two groups namely primary activities and support activities. Primary activities included use of ICT in learning, teaching, research and training as the core service area and then for enhancing the value in each. It further included remote access to data, faster and more precise data processing, simulation of complex systems, collaboration between research groups. The support activities were linked with primary activities to improve the effectiveness/ efficiency and contain ICT vision, policies and standards, ICT infrastructure, ICT services. Backer and Mohamed (2008) elaborated on the benefits of ICT in teaching. These studies have certain limitation keeping same immediate objectives in mind, in that country. However, the analysis presented by Mokhtar et al and Bakar & Mohamed was academic in nature, carried out for colleges only and not for universities and higher educational institutions of training and research. We plan to undertake this work for universities of western Himalayan region in India. This region is typically a difficult terrain in which people have to really struggle for livelihood, health and education. It is in this context the government of India is paying special attention to alleviate the level of education using the full potential of ICT, in this region. In view of this, a little different framework for the universities of this region is required. A framework will be developed for assessing the initiative, status and performance of different universities. Initiative will imply vision and planning of the ICT programs in the universities. ICT status would mean complete ICT infrastructure including local area network facility, internet network security, mobile computing access, system application software, website and information system, teaching display technologies, ICT technical staff, ICT budget allocation, e- library, e- placement/ alumni portal. ICT performance will be related with various IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 47 activities based on ICT infrastructure. It would include teaching; learning and ICT based research at the conventional level and at the advanced level in the form of ICT training programs. This performance is going to have an impact of the ICT programs, functional in the universities, in the form of actual placements of the outgoing students, research publications and actual problem solving. This outline of the framework will be discussed explicitly in the next section. The objective of this study is to undertake the task of assessment regarding initiative, utilization of ICT resources, its performance and impact in these higher educational institutions/ universities. In order to achieve this, an overall status report is prepared using the framework of this paper. A questionnaire was prepared accordingly, related to various ingredients of ICT, initiative, status and performance. Then a survey was conducted in different universities located in the western Himalayan region, as per the questionnaire. The analysis and comparison of the initiative, status and performance through performance indicators in respective universities has been carried out. The corresponding benchmarking is expected to identify the future ICT strategies in order to improve their status as well as the product in the form of professionally skilled human resource in the field of ICT. The reference period of the study has been the year 2009. The paper is organized in six sections. After the introduction in section 1, the basic framework will be presented in section 2. The methodology, preparation of questionnaire, a survey and analytic procedure will be given in section 3. Section 4 will deal with the results obtained from the analysis of the primary data. Summary and conclusions are given in Section 5. Future strategies are discussed in the final Section. 2. Basic Framework Before discussing the methodology it seems proper to have a framework on the basis of which the study of ICT initiative, status, performance and impact in the field of ICT in different universities and higher technical institution, is carried out. The important building blocks are supposed to be Performance Indicators (PI). One group of authors (Riley and Nuttall 1994) suggests that Performance Indicators must be something quantitative, whereas the other group takes a wider view in favour of qualitative and descriptive statement for PI. The latter view is adopted by International Standards Organisation (1998). Both these measures, quantitative as well as qualitative, will be used here that will allow us to have a complete view of richness and diversity of the ICT based academic/ technological performance and the related activities. With these it should be possible to assess and judge the effectiveness, efficiency and impact of an institution in terms of ICT performance to have the possible projection to finally decide about the future strategies. In deciding the basic framework, the question is what are the ICT ingredients/ components and Performance Indicators for assessing the ICT initiative, status and their performance at different levels. The basic ingredients of ICT are clearly classified among four tiers, containing 117 questions divided in 18 groups, A-R. These groups, in their respective tier, depict different academic components of ICT and the related activities. Schematic representation of four tier framework is given in Fig. 1. Fig. 1: Four Tier framework. Each box contains the main ICT component along with the number of questions in it The basis of formulating this framework has been the recommendations contained in the documents available at the national and international level, as mentioned in the introduction. This framework is supposed to be most suited to the university and higher educational institutions which are mainly the centre of research where knowledge is created. In each group one of the questions, the last one, is related to the performance. All these performance related questions, are placed in another group, S. These groups, alongwith the Performance Indicator in each, are presented in Table I: Table I: Various Groups of ICT Components in an Institution. IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 48 3. Methodology The universities located in the western Himalayan region imply those spreading over the state of Himachal Pradesh and Jammu & Kashmir. There are mainly 7 universities located in the western Himalayan region of India, out of which 6 universities have been selected purposely. Five universities belong to the state or the central government, and one is a private university but deemed university approved by the University Grants Commission under the aegis of Ministry of Human Resource Development, Government of India. These are Himachal Pradesh University (Shimla), Y.S. Parmar Horticulture University (Solan), C.S.K. Agriculture University (Palampur), National Institute of Technology (Hamirpur), Jammu University (Jammu) belonging to the government and J.P. University (Solan) as deemed university. In order to have the information regarding ICT initiative, status and performance in the universities of this region, the questionnaire was given to the concerned head of the department of ICT/ IT/ Computer Science in the institution/ universities personally. The concerned head was requested to provide information/ feed back as per the questionnaire. Thus the information was gathered personally by the authors. In the structured questionnaire, the feedback to various queries were on five point scale arranged in a particular order that revealed the natural flow from the lowest level to the highest level, in increasing order of sophistication. That is why it was thought reasonable to give a weightage of 1 to 5 respectively to each level in increasing order. Simple standard statistical tools were used to analyse the data groupwise to find the Weighted Mean, Standard Deviation and Coefficient of Variation (CV) keeping in mind the weight of respective levels. The CV indicates the variation around its weighted mean in the series, the lesser is the CV, more consistent and stable is the series. However, the weighted mean was found to be a better measure as compared to CV, to understand the trend in a particular group. The use of median was another alternative but in view of the fact that the data was not having extreme variation and due to the limitation of the median method, weighted mean was logically preferred. Another statistical quantity ‘Coefficient of Correlation’ among various groups was also calculated which has also been used to ascertain the proper groupings in the questionnaire. A simple tabular analysis was carried out to find out the results. In view of the fact that queries were replied on five point scale with the respective weight from one to five, firstly weighted mean of each group was calculated followed by overall mean in the respective tier. The weighted mean was found by picking up the proper value of the response in a particular level on the five point scale (say L1 to L5). Then dividing it by the total value of the levels, i.e. sum of 1 to 5, multiplied by the number of questions in the group. This is repeated for all the groups for six universities of the region. These are presented in Table II. The Pearson’s Coefficient of Correlation of each group with the Performance Indicator group is given in the last column of the Table II. Table II: Weighted Mean and Pearson’s Correlation Coefficients of various groups with Group R IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 49 4. Results and Discussions: The weighted mean for Tier I, vision, initiative and planning, for different universities has been presented in Fig.2, which depicts a comparative view among the universities. Status of ICT Vision, Initiative and Planning among different Universities(TIER I) 0.29 0.30 0.19 0.24 0.23 0.31 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 Status of Universties W ei gh te d M ea n JPU, Solan N.I.T, Hamirpur C.S.K.U, Palampur JU, Jammu Y.S.P.U, Nauni H.P.U, Shimla Fig.2 Tier I. This diagram shows that there is not much difference corresponding to the vision and planning, particularly in the first three universities i.e. JP University, NIT and H.P.University. At the level of vision, initiative and planning all the universities thought big with a minor difference. Standard deviation and the coefficient of variation were also calculated. A range of coefficient of variation (%) was found to be 14.54%, 15.13%, 18.04%, 24.05, 32.66% and 39.44% respectively for H.P.University, J.P.University, NIT, Hamirpur, Nauni University, Jammu University and Palampur University. It reveals that first three universities are having more consistency in ICT vision, initiative and planning than the later three universities. Because for the same vision, the ICT initiatives and planning were at different levels. Further, the level of vision also differed from one university to another. The overall weighted mean of all the different groups related to Tier II which mainly deals with overall ICT infrastructure among different universities in the region, has been presented in Fig. 3. Status ICT Infrastructure among different Universities (TIER II) 0.24 0.30 0.10 0.20 0.17 0.18 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 Status of Universties W ei gh te d M ea n JPU, Solan N.I.T, Hamirpur C.S.K.U, Palampur JU, Jammu Y.S.P.U, Nauni H.P.U, Shimla Fig. 3. Tier II From this diagram, it may be seen that NIT Hamirpur is having the largest ICT infrastructure followed by J.P. University, Jammu University, H.P.University, Nauni University and Palampur University. This difference may be mainly attributed to advanced ICT facilities available in NIT, Hamirpur like better Local Area Network (LAN) with internet facilities, video-conferencing facility available with each faculty, Mobile (Wi-Fi) computing facility, IP telephony and assured access to all the digital tools/ resources on the campus. These facilities are also available in the hostels and faculty accommodation as well, along with an effective web site and information system. In this respect NIT Hamirpur has an edge over other universities. Other contributing factors are the effectiveness of ICT training progammes, organized for the faculty, students and professionals as the drive for human resource development programs. Finally, the placement of professionals in reputed establishments adds much more weightage in this direction. This figure further shows that the difference between Jammu University and Himachal Pradesh University is very little. It is particularly because of the fact that Jammu University is having higher internet bandwidth, better mobile computing facilities alongwith e-library as compared to those available in Himachal Pradesh University. Tier III, is concerned with the main ICT activities which can be further divided into primary activities of teaching and learning and advanced activities like sophisticated training & research using ICT for developing professional skills. These are displayed in fig 4. Status of ICT based Teaching/Learning/Reseach/Training among differnt universities (TIER III) 0.22 0.25 0.14 0.17 0.13 0.15 0.00 0.05 0.10 0.15 0.20 0.25 0.30 Status of Universties W ei gh te d M ea n JPU, Solan N.I.T, Hamirpur C.S.K.U, Palampur JU, Jammu Y.S.P.U, Nauni H.P.U, Shimla Fig.4 Tier III. This category deals with various academic activities. Teaching and learning using ICT based tools is one of the effective approaches of procuring knowledge. Researches using e-journals and the material available on the internet have become the lifeline of any good research activity. These ICT tools have provided the academic community a more versatile powered instrument. Further, awareness and training programs at the advanced level to produce professionally skilled technological human resource have IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 50 become more and more effective using these ICT tools. In this respect, NIT Hamirpur has established superiority over others in this category also, followed by J.P.University, Jammu University and H.P.University etc. ICT Impact Status(Placement/Research) 0.30 0.32 0.17 0.23 0.15 0.22 0.00 0.05 0.10 0.15 0.20 0.25 0.30 0.35 Universities W ei gh te d M ea n JPU, Solan N.I.T, Hamirpur C.S.K.U, Palampur JU, Jammu Y.S.P.U, Nauni H.P.U, Shimla Fig. 5. Tier IV Tier IV of the framework exhibits the impact of universities at the local (societal) level, at the national and international level as well. The impact is reflected mainly through two components. One is outstanding research supported with patents for the fruitful activities and for the benefit of mankind. Another is the placement of outgoing students trained in professional courses, to reputed universities, institutes, industries and other organizations. The impact factor has been given in Fig.5, which reveals that NIT Hamirpur is again having an edge over other universities in the western Himalayan region of India, followed by J.P.University, Jammu University and Himachal Pradesh University. The main reason for this variation is the value addition through research, particularly supported by the advanced ICT infrastructure. Further, large number of good research publications per year, along with successful collaborative research work also becomes an important factor for the superiority of one university over the other. In addition, actual placement contributes the most to Tier IV in the form of linkages of the professionals with industries. Towards the end, it was thought reasonable to have Pearson’s Coefficient of Correlation (CC) of different groups with the group S depicting the Performance Indicators. These Correlation Coefficients have been given in Table II and displayed in Fig. 6. 0.60 0.70 0.48 0.70 0.93 0.640.60 0.49 0.93 0.80 0.92 0.77 0.71 0.79 0.38 0.950.91 0.63 0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00 Group's Fig.6 Performance Indicator C oe ff of C or re la tio n Group A Group B Group C group D group E Group F group G group H Group I group J Group K group L Group M Group N Group O Group P Group Q Group R Fig. 6. Correlation with performance Indicators. On its perusal, the CCs are found to vary between 0.38 and 0.95. Its value, >90, was found for five groups. These groups are E (LAN), I (Website and Information System), K (ICT Staff), P (ICT based Research) and Q (ICT training programs). It speaks for the obvious that the advanced internet facility used in research and training programs has a better correlation with the performance of an institution. This is found quite consistent with the analysis presented above. The next five groups having CCs between 0.70- 0.89, are found to be due to D (ICT Infrastructure), J (Teaching Display Technologies), L (ICT Budget Allocation), M (e-Library) and N (Alumni portal and placement). There is another set of five groups having CCs between 0.6-0.69, which is found just acceptable. These are related with ICT vision, initiative, internet & network security, mobile computing facility and impact of ICT. The remaining three groups having correlations below 0.60 are not acceptable due to inadequate planning in ICT based teaching programs. 5. Summary and Conclusion In this study we have presented an assessment from the primary data gathered as feedback to a questionnaire divided into 18 different relevant groups in respect of ICT activities starting from vision, initiative, planning, implementation, ICT infrastructure, to the performance/ success of various ICT initiatives in six universities in the western Himalayan region. Performance Indicator of each of the groups was identified that was utilized to gauge the success of ICT initiatives at different stages of the framework. The vision and planning covered in Tier I are not enough if these are not supported with the proper initiative by a visionary at the highest level in the university system with full support from the government along with a small but dynamic team involved with it. It may be emphasized that a good academic curriculum at the teaching level and better faculty are the key factors which are most essential to impart the latest in the field of ICT. It further requires equally good infrastructure (Tier II) hardware, software and fast access to the internet in the ICT laboratory. After all the universities are meant (Tier III) to create knowledge and the professionally skilled dedicated manpower trained not at the local level but at the international level. Professional spirit with dedication of a person is further gauged with a scale on how much busy IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 51 his academic schedule remains for understanding and for problem solving. The better performance always results in sound impact (Tier IV) at the national and international level in terms of outstanding research publications and actual placements. It may be concluded from the analysis of all the components of the four- tier framework that NIT Hamirpur has a clear- cut superiority over the other universities in this region, due to the sound vision, excellent ICT infrastructure and efficient ICT based activities and fast adoption of innovation in the field of ICT, whose impact became known at the national and international level. The other Universities should follow the live example of NIT Hamirpur. Finally, it is the performance in each of the groups that really matters. The correlation of Performance Indicators (group S) with all the other eighteen groups echoes the same. These correlation coefficients further provided the strength to the conceptualization of groups presented in the questionnaire used in this work. Our findings about the overall ICT status is on the basis of performance and impact do match with the reported ranking given to universities by NAAC and other agencies. This finding is quite interesting which proclaims that overall progress shown by any of the universities is mainly due to the respective progress through initiative, planning, infrastructure and performance in the field of ICT. One could not think of scoring better ranking at the national or international level without the proper development in ICT which has become synonym with the progress of the university. 6. Future Strategies The pattern revealed in this paper in respect of initiative, status and performance of different universities in the targeted area of the country points towards future strategies as follows: Although ICT initiatives in different universities are quite encouraging, its extension must be envisaged in all higher educational institutions of the country. It must include the advanced training programs to prepare professionally skilled manpower using ICT for enhancing the core competence of scientists in the field of ICT and making these programs more meaningful. These skilled professionals should function as nucleus to further extend such programs to create more skilled human resource. They must plan with determination, of removing the sufferings of humanity using the earned knowledge to fulfill the objectives of `Transforming the Society’ as envisaged in the Kothari Commission report of 1966 and the Technology Vision 2020 document prepared by TIFAC for India Different courses in the form of e-content inclusive of video, in Indian universities are made available as freeware similar to those of MIT open courseware, as envisioned by NMEICT. It will have an effective long term sustainable impact on society by way of advance ICT enabled education and empowerment of people in the western Himalayan region of the country. Acknowledgments Authors express their sincere thanks to Dr. S.P. Saraswat, Agro-Economic centre, H.P.University, Shimla, for very fruitful discussion during data analysis. References [1] A. R. Bakar & Shamsiah Mohamed. “Teaching using Information and Communication Technology: Do Trainee Teachers have the Confidence?” International Journal of Education and Development using ICT, Vol 4, No.1, (2008), 374 [2] T. Anderson, S. Vernhagen. et al., “Faculty Adoption of Teaching and Learning Technologies : Contrasting Earlier Adopters and Mainstream Faculty.” The Canadian Journal of Higher Education, 28 (1998), pp. 71-98. [3] P, Attewell, “Technology Diffusion and Organisation Learning: The Case of Business Computing.” Organisation Science, 3, (1992), pp 1-19. [4] A. Berstein, and A.E. Goodman, “ Global Diffusion of the Internet VI, The Internet in Togo” Communication of the Association for Information Systems, 15, 2005,pp 371-392). [5] J.D. Farquhar, & D.W Surry., Adoption Analysis: An Additional Tool for Instruction Developers. Educational and Training Technology 31, pp. 19-25(1994). [6] G.R. Fichman, Information Technology Diffusion: A Review of Empirical Research, Proceedings of the Thirteenth International Conference on Information Systems (ICIS), December, Dallas, 195-206 (1992). [7] R.G. Fichman, “The Diffusion and Assimilation of Information Technology Innovations in Framing the Domains of IT Management: Projecting the Future Through the Past”, Robert Z., editor, Pinnaflex Publishing (2000) [8] W. Foster, S.E Goodman, E Osiakwan, and A.Bernstein, “Global Diffusion of the Internet IV: The Internet in Ghana”, Communication of the association for Information Systems, 2004, Vol 13, 654-681. [9] International Standards Organisation. ISO 11620: Information and Documentation- Library Performance indicator. (International Standards Organisation, Geneva), 1998 IJCSI International Journal of Computer Science Issues, Vol. 6, No. 2, 2009 52 [10] A.P.J Kalam,.& V .Rajan, India 2020– A Vision for the New Millennium (Penguin Books India ), 1998. [11]Karmeshu & R.K. Pathria, , Stochastic Evolution of a Non- linear Model of Diffusion of Information, Journal of Mathematical Sociology, 7, pp-59-71. 1980 [12]Karmeshu, C.L. Sharma, and V.P. Jain, Nonlinear Stochastic Models of Innovation Diffusion with Multiple Adoption Levels, 51, 1992, pp 229-241 [13] L.S Kothari, Kothari Commission Report (Government of India), 1966 [14] Kulik & Kulik Effectiveness of Computer-based Instruction: An Updated Analysis, Computer in Human Behavior, 7, 75- 94. 1991 [15] V.B. Lal, Karmeshu & S. Kaicker, Modeling Innovations, Diffusions with Distributed Time-lag, Technological Forecasting and Social Change, Elsevier Science, 34, 1988, pp.34-113. [16] V. Mahajan, & R. Peterson, Models for Innovation Diffusion, Braverly Hills, C.A Sage Publications. 1985 [17] V. Mahajan, E. Muller, and F.M. Bass, New Product Diffusion Models in Marketing: A Review and Directions for Research, Journals of Marketing, 54, 1990, pp.1-26 [18] S.A. Mokhtar, R.A Alias, and A.A Rahman,., “Academic Computing at Malaysian Colleges”, J. Education and Development Using ICT 3, 2007, 312 [19]MIT open courseware http://ocw.mit.edu/ OcwWeb/web/home/home/index.htm (Accessed on 12/08/2009) [20]National Assessment & Accreditation Council, New Methodology of Assessment & Accreditation. 2007 [21] NASSCOM Strategic Review, 2009. [22] N.M. Ochara, J.P.V. Belle, and I. Brown, Global Diffusion of the Internet XIII: Internet Diffusion in Kenya and its Determinants- A Longitudinal Analysis. 23, 2008,pp.123- 150. [23] M.E Porter, Competitive Advantage (Free Press, New York), 1985 [24] K.A Riley, and D.L. Nutall., Edited. Measuring Quality: Education Indicators- United Kingdom and International Perspectives. (The Falmers Press, London) pp.17-40. 1994 [25]P. Resta,. (Ed.), Information and Communication Technologies in Teacher Education, A Planning Guide.(UNESCO, Paris), 2002 [26] E. Roger, Diffusion of Innovations, New York, The Free Press, 1995 [27] L.,Roy, & D. Raitt,., The Impact of IT on Indigenous Peoples, The Electronic Library, 21, 411-13, 2003 [28] S. Sadagopan, “Historical Perspective in IT In India- A status report, April 24,1998. http://www.allindia.com/infotechtechdesk/art1a.htm, 1998 [29]SEUSISS PROJECT., “Survey of European Universities Skills in ICT of Students and staff - Final Report”.(Accessed on 08/05/09, from http:// www.intermedia.uib.no/seusiss/) 2003 [30]Tadon.S, ICT Country Status Report: India, 2002. ww.tc.apii.net/~apt2003/India/ Mystatus.htm (Accessed on 02nd November 2009) [31]UNESCO, ICT Policies of Asia Pacific, 2007-08. [32] W. Foster, S.E. Goodman, , E. Osiakwan, and A. Bernstein, “Global Diffusion of the Internet VI, The Internet in Togo”, Communication of the Association for Information Systems, 15, 2005, pp 371-392. [33] B.L. Wilson, L.Sherry et al, “Adoption of Learning Technologies in Schools and Universities” Handbook on information technologies for education and training. H.H.Adelsberger, B.Collis and J.M.Pawlowski. New York, Springer- verlag. 2000 [34] P.Wolcott, and S,E. Goodman, , “Global Diffusion of the Internet-I: India: Is the Elephant Learning to Dance?”, Communications of Association for the Information Systems 113, 2003, pp 560-646 Dhirendra Sharma is pursuing his Ph.D from the Department of Computer Science and Engineering, Ch. Devi Lal University, Sirsa, Haryana, India. He has obtained his MBA from Maastricht School of Management, Maasticht, Netherlands, M.S from BITS, Palani, India and Masters in Physics from Himachal Pradesh University, Shimla, India. His areas of interest are ICT in Educational Institutes, computer networking (wired and wireless), Sensor Networks, and Open source web content management. He played a very important role in the Design and Implementation of Campus Wide Optical Fibre Network backbone of Himachal Pradesh University, Shimla. He is having more than 10 years of teaching experience in addition to his 5 years in IT Industry. Dr. Vikram Singh is Ph.D in Computer Science from Kurukshetra University, Kurukshetra, India. Presently he is working as Professor and Head in the Department of Computer Science & Engg and Dean Faulty of Engineering, Ch. Devi Lal University, Sirsa – 125055.Haryana, (India), since 2004 onwards. Before this he was working with Kurukshetra University, Kurukshetra. His areas of research are Computer Networks, E-Governance, Simulation tools, etc. He is having more than 17 years of teaching/research experience and has written two books and having more than 30 publications in international and national journals/conference proceedings.
0non-cybersec
arXiv
Rocket Chat Realtime API in browser. <p>I want to create a Rocket Chat client to subscribe to a channel through browser using Realtime API. Documentation <a href="https://rocket.chat/docs/developer-guides/realtime-api/" rel="noreferrer">here</a> does not provide step by step procedure. Please let me know how to achieve it. </p> <p>Links to any documentation would be very helpful.</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
SQL Agent - PowerShell step &quot;syntax error&quot;. <p>I have the following code setup in SQL Agent Job step that is not running. The message received is simply:</p> <blockquote> <p>Unable to start execution of step 1 (reason: line(46): Syntax error). The step failed.</p> </blockquote> <p>The duration of the job is: <code>00:00:00</code></p> <p>Line 46 of this script is a <code><a href="http://technet.microsoft.com/en-us/library/ee692792.aspx" rel="noreferrer">here-string</a></code>:</p> <pre><code> ,@DriveLetter = '$($c.DriveLetter)' </code></pre> <p>This script runs perfect outside of SQL Server Agent.</p> <p>ServerNames table:</p> <pre><code> CREATE TABLE ServerTable ( ServerName varchar(50) ) </code></pre> <p>Disk Space table would be something similar to:</p> <pre><code> CREATE TABLE DiskSpace ( ID int IDENTITY(1,1), ServerName varchar(50), DriveLetter varchar(2), DiskSpaceCapacityGB decimal(12,5), DiskSpaceFreeGB decimal(12,5) ) </code></pre> <p>PowerShell Script: <pre><code> <em>This command is to allow SQL Agent job to show failure in event PowerShell script errors Default behavior in SQL Agent for PowerShell steps it 'Continue'</em> $erroractionpreference = "Stop"</p> <p>$sqlInstance = 'server1' $sqlDatabase = 'database1'</p> <p>$qServerList = @" Select ServerName From ServerTable "@</p> <p>$srvList = Invoke-Sqlcmd -ServerInstance $sqlInstance -Database $sqlDatabase -Query $qServerList | Where-Object {$_ -ne '' -or $_ -ne $null} | Select-Object -ExpandProperty ServerName</p> <p>foreach ($s in $srvList) { if (Test-Connection -ComputerName $s -Count 1 -ErrorAction 'SilentlyContinue') { try { $cServer = Get-WmiObject Win32_Volume -ComputerName $s -ErrorAction 'Stop' | where {$<em>.DriveType -eq 3 -and $</em>.DriveLetter } | Select-Object @{Label="ServerName";Expression={$s}}, @{Label="DriveLetter";Expression={$<em>.DriveLetter}}, @{Label="DiskSpaceCapacityGB";Expression={"{0:N0}" -f($</em>.Capacity/1GB)}}, @{Label="DiskFreeSpaceGB";Expression={"{0:N2}" -f($_.FreeSpace/1GB)}}</p> <pre><code> foreach ($c in $cServer) { $qAddServerDiskSpace = @" </code></pre> <p>EXEC [dbo].[StoredProcInsert] @ServerName = '$($c.ServerName)' ,@DriveLetter = '$($c.DriveLetter)' ,@DiskSpaceCapacityGB = $($c.DiskSpaceCapacityGB) ,@DiskFreeSpaceGB = $($c.DiskFreeSpaceGB) "@</p> <pre><code> try { Invoke-Sqlcmd -ServerInstance $sqlInstance -Database $sqlDatabase -Query $qAddServerDiskSpace -ErrorAction 'Stop' } catch { $ErrorMsg = $_.Exception.Message $fullMsg = "Error writing executing dbo.StoredProcInsert for $s - $ErrorMsg" Return $fullMsg } } } catch { $ErrorMsg = $_.Exception.Message $qAddPSErrorLog = @" </code></pre> <p>EXEC [dbo].[StoredProcInsert_Error] @ServerName = '$($cServer.ServerName)' , @ErrorText = '$($ErrorMsg)' "@ try { Invoke-Sqlcmd -ServerInstance $sqlInstance -Database $sqlDatabase -Query $qAddPSErrorLog -ErrorAction 'Stop' } catch { $ErrorMsg = $_.Exception.Message $fullMsg = "Error writing executing dbo.StoredProcInsert_Error for $s - $ErrorMsg" Return $fullMsg } } } else { $qAddPSErrorLog = @" EXEC [dbo].[StoredProcInsert_Error] @ServerName = '$($cServer.ServerName)' , @ErrorText = 'Unable to ping server' "@</p> <pre><code> try { Invoke-Sqlcmd -ServerInstance $sqlInstance -Database $sqlDatabase -Query $qAddPSErrorLog -ErrorAction 'Stop' } catch { $ErrorMsg = $_.Exception.Message $fullMsg = "Error writing executing dbo.StoredProcInsert_Error for $s - $ErrorMsg" Return $fullMsg } } </code></pre> <p>}</p> <p></pre></code></p> <p><strong>EDIT</strong></p> <p>Setup additional steps to try using CmdExec type as <code>PowerShell -Command "&amp; { }"</code>. With this execution the script runs and the error log is populated for the appropriate catch blocks, but no disk space data is written to the table.</p> <p>The agent history for this run shows a warning message:</p> <blockquote> <p>Message Executed as user: NT Service\SQLAgent$myInstance. WARNING: Some imported command names include unapproved verbs which might make them less discoverable. Use the Verbose parameter for more detail or type Get-Verb to see the list of approved verbs. Process Exit Code 0. The step succeeded.</p> </blockquote> <p>If I use the same type step but call the file: <code>PowerShell -File MyScript.ps1</code> I get the same message as the PowerShell step type above for syntax error.</p>
0non-cybersec
Stackexchange
CentOs, Apache24. <p>Essentially I am installing apache2.4 onto centOs6.6 using the Apache2 CHEF cookbook. I have it working to the point where all the service commands work minus the </p> <pre><code> sudo service httpd24-httpd graceful </code></pre> <p>command, unfortunately the chef script will not complete without that service. It provides me with the following error:</p> <pre><code>/opt/rh/httpd24/root/usr/sbin/apachectl: line 112: /usr/bin/systemctl: No such file or directory </code></pre> <p>sure enough that file (systemctl) isn't there. The cookbook is just deferring to yum to install apache - so I am a bit confused as to why it isn't installed, IF it is needed. How is systemctl installed on centos?</p> <p>Folow up question: Isn't systemctl an ubuntu app? If is my apache24 install messed up OR does apache24 have a reliance on this? </p> <hr> <p>So I retried on a fresh VM </p> <pre><code> cd /yum/repos.d wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo sudo yum install httpd24 sudo service httpd24-httpd graceful </code></pre> <p>Then a </p> <pre><code>/opt/rh/httpd24/root/usr/sbin/apachectl: line 116: /usr/bin/systemctl: No such file or directory </code></pre> <p>It doesn't look to be associated with the cookbook at all. It looks tobe completely associated with the httpd24 install</p>
0non-cybersec
Stackexchange
Integrate Cocos2dx project within Swift Project (XCode 6.3). <p>I have 2 separate Projects one is in Cocos2dx v3.6 and one is in Swift. I want to start a game from the Swift project. How can I do it?</p> <p>I have copied whole cocos2dx project into my Swift project and then created one View Controller in swift and trying to open CCDirector as a root view of the project. but not able to find director, I am trying to import cocos2dx with this <strong>#import "cocos2d.h"</strong> , but it is giving me error of "undefined file".</p> <p><a href="https://i.stack.imgur.com/kJpSh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kJpSh.png" alt="This is how I added Cocos2dx project in my Swift Project"></a></p> <p>Apple Swift version 1.2</p>
0non-cybersec
Stackexchange
Are faces of a compact, convex body &quot;opposed&quot; iff their extreme points are pairwise &quot;opposed&quot;?. <p>Let $P$ be a compact, convex subset of $\mathbb{R}^n$ (infinite-dimensional generalisations welcome, but not necessary). Let's say that disjoint subsets $W_1$, $W_2$ $\subset P$ are <em>opposed</em> if there exist parallel hyperplanes $H_1$, $H_2$ supporting $P$, such that $W_i \subset H_i \cap P$.</p> <p>Let $F_1$ and $F_2$ be faces of $P$, such that their extreme points are pairwise opposed: i.e. $v_1, v_2 \in P$ are opposed whenever $v_i$ is an extreme point of $F_i$. Are $F_1$ and $F_2$ opposed? </p> <p>I have a tentative proof when $P$ has affine dimension equal to 2, which I am struggling to generalise even to 3 dimensions. The converse is trivial. I'd also be interested to know if a proof of this requires some restriction on $P$ (e.g. letting $P$ be a polytope).</p>
0non-cybersec
Stackexchange
Terminology: What to call a set where equivalence is defined over all members?. <p>Math amateur here, and new to the site. I have to write a technical specification, and am rather unsure about how to express things mathematically properly.</p> <p>So I have a set of “entities” of some sort. Let's call it A. It shouldn't matter what the entities are for this question.</p> <p>I also have a notion of equivalence between the entities in A.</p> <p>But, for any two entities, it may or may not be possible to tell whether they are equivalent. So, the equivalence relationship is not defined for all pairs of entities.</p> <p>Now, I need to talk a lot about subsets of A where the equivalence relationship is defined for all members of the subset. (For any a and b in the subset, “a equivalent b” is defined.) </p> <p>What should I call these subsets? Is there a good term for describing exactly that? So I'm looking for a good term for XXX in this sentence: “If a subset B of A is a XXX (that is, “a equivalent b” is defined for any a and b in B), then…”</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
Python - matplotlib - how do I plot a plane from equation?. <p>I have an equation z=0.12861723162963065X + 0.0014024845304814665Y + 1.0964608113924048</p> <p>I need to plot a 3D plane for this equation in python using matplotlib. I have already tried following this post -- <a href="https://stackoverflow.com/questions/48335279/given-general-3d-plane-equation-how-can-i-plot-this-in-python-matplotlib">Given general 3D plane equation, how can I plot this in python matplotlib?</a></p> <p>However I am unable to set the x,y and z limits for this plane.</p> <p>Can someone provide me the correct way of converting this equation into 3D plane. Thanks</p>
0non-cybersec
Stackexchange
Why is my Reddit homepage filled with 80% links from the same sub, when I'm subscribed to close to 100 different subs?. It's not always the same sub either, and it's usually not one that I frequent.
0non-cybersec
Reddit
Win10 - can&#39;t reach ubuntu VM after last big windows update (again :-/ ). <p>Once again after major windows update my virtualbox networking went down the drain... </p> <p>My VMs are starting and I can connect to them via vagrant port forwarding. But I cannot reach them from windows host on the internal network (pinging them on 10.0.0.30). VMs have connection to the outside world. Also VMs (I have two with the same vagrant file, differs only in last IP segment) can ping themselves on static IPs in this private network.</p> <p>I suspect it is either windows firewall or incorrect routing on host. But I cannot find a way to make it work again.</p> <p>Details:</p> <p>Host: Windows 10 Pro with VirtualBox Guest: Ubuntu (box: ubuntu/xenial64)</p> <p>Vagrant file: </p> <pre><code># -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure(2) do |config| config.vm.box = "ubuntu/xenial64" config.vm.synced_folder ".", "/vagrant", mount_options: ["dmode=777,fmode=666"] config.vm.provider "virtualbox" do |v| v.memory = 8192 v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] end config.vm.define :dev do |dev| dev.vm.hostname = "local-dev" dev.vm.network "private_network", ip: "10.0.0.30" dev.vm.provision :shell, path: "bootstrap.sh" dev.vm.provision :shell, inline: 'PYTHONUNBUFFERED=1 ansible-playbook \ /vagrant/ansible/dev.yml -c local' end if Vagrant.has_plugin?("vagrant-cachier") config.cache.scope = :box end if Vagrant.has_plugin?("vagrant-vbguest") config.vbguest.auto_update = false config.vbguest.no_install = true config.vbguest.no_remote = true end end </code></pre> <p>ifconfig on guest ubuntu:</p> <pre><code>ubuntu@local-dev:~$ ifconfig docker0 Link encap:Ethernet HWaddr 02:42:0b:f0:0e:b8 inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 inet6 addr: fe80::42:bff:fef0:eb8/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:69 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:11583 (11.5 KB) enp0s3 Link encap:Ethernet HWaddr 02:6e:aa:4e:78:a9 inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0 inet6 addr: fe80::6e:aaff:fe4e:78a9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:97907 errors:0 dropped:0 overruns:0 frame:0 TX packets:43080 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:85101631 (85.1 MB) TX bytes:2663603 (2.6 MB) enp0s8 Link encap:Ethernet HWaddr 08:00:27:d4:43:c2 inet addr:10.0.0.30 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: fe80::a00:27ff:fed4:43c2/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:142 errors:0 dropped:0 overruns:0 frame:0 TX packets:113 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:24608 (24.6 KB) TX bytes:17882 (17.8 KB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:38 errors:0 dropped:0 overruns:0 frame:0 TX packets:38 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:2520 (2.5 KB) TX bytes:2520 (2.5 KB) veth6b6e39b Link encap:Ethernet HWaddr 7e:a7:58:89:5a:f4 inet6 addr: fe80::7ca7:58ff:fe89:5af4/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:77 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:12231 (12.2 KB) </code></pre> <p>ipconfig on windows host:</p> <pre><code>&gt; ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : antigro_ciesiel Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . : No WINS Proxy Enabled. . . . . . . . : No Ethernet adapter Ethernet: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter Physical Address. . . . . . . . . : 00-0E-C6-E3-26-C3 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Ethernet adapter Ethernet 3: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Realtek USB GbE Family Controller Physical Address. . . . . . . . . : 00-E0-4C-02-09-27 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Ethernet adapter VirtualBox Host-Only Network #5: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter #5 Physical Address. . . . . . . . . : 0A-00-27-00-00-04 DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::2457:af67:45f4:7d18%4(Preferred) IPv4 Address. . . . . . . . . . . : 192.168.56.1(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : DHCPv6 IAID . . . . . . . . . . . : 67764263 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-A9-43-A1-00-0E-C6-E3-26-C3 DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled Ethernet adapter VirtualBox Host-Only Network #6: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : VirtualBox Host-Only Ethernet Adapter #6 Physical Address. . . . . . . . . : 0A-00-27-00-00-2F DHCP Enabled. . . . . . . . . . . : No Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::d466:173f:3d9f:8a4e%47(Preferred) IPv4 Address. . . . . . . . . . . : 10.0.0.1(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : DHCPv6 IAID . . . . . . . . . . . : 789184551 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-A9-43-A1-00-0E-C6-E3-26-C3 DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled Wireless LAN adapter Local Area Connection* 2: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter Physical Address. . . . . . . . . : 10-02-B5-CD-F4-20 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Wireless LAN adapter Local Area Connection* 11: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Microsoft Wi-Fi Direct Virtual Adapter #2 Physical Address. . . . . . . . . : 12-02-B5-CD-F4-1F DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Ethernet adapter Ethernet 2: Media State . . . . . . . . . . . : Media disconnected Connection-specific DNS Suffix . : Description . . . . . . . . . . . : TAP-NordVPN Windows Adapter V9 Physical Address. . . . . . . . . : 00-FF-EE-9A-6B-4A DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 7265 Physical Address. . . . . . . . . : 10-02-B5-CD-F4-1F DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::14f:78ac:ef5:ee8b%13(Preferred) IPv4 Address. . . . . . . . . . . : 10.10.21.181(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.0 Lease Obtained. . . . . . . . . . : wtorek, 12 czerwca 2018 09:20:56 Lease Expires . . . . . . . . . . : wtorek, 12 czerwca 2018 14:01:18 Default Gateway . . . . . . . . . : 10.10.21.1 DHCP Server . . . . . . . . . . . : 10.10.21.1 DHCPv6 IAID . . . . . . . . . . . : 772801205 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-A9-43-A1-00-0E-C6-E3-26-C3 DNS Servers . . . . . . . . . . . : 10.10.21.1 8.8.8.8 188.117.188.117 89.25.182.14 NetBIOS over Tcpip. . . . . . . . : Enabled </code></pre> <p>Route table on windows host:</p> <pre><code>&gt; route PRINT =========================================================================== Interface List 28...00 0e c6 e3 26 c3 ......ASIX AX88179 USB 3.0 to Gigabit Ethernet Adapter 24...00 e0 4c 02 09 27 ......Realtek USB GbE Family Controller 4...0a 00 27 00 00 04 ......VirtualBox Host-Only Ethernet Adapter #5 47...0a 00 27 00 00 2f ......VirtualBox Host-Only Ethernet Adapter #6 31...10 02 b5 cd f4 20 ......Microsoft Wi-Fi Direct Virtual Adapter 14...12 02 b5 cd f4 1f ......Microsoft Wi-Fi Direct Virtual Adapter #2 33...00 ff ee 9a 6b 4a ......TAP-NordVPN Windows Adapter V9 13...10 02 b5 cd f4 1f ......Intel(R) Dual Band Wireless-AC 7265 1...........................Software Loopback Interface 1 =========================================================================== IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 10.10.21.1 10.10.21.181 45 10.0.0.0 255.255.255.0 On-link 10.0.0.1 281 10.0.0.1 255.255.255.255 On-link 10.0.0.1 281 10.0.0.255 255.255.255.255 On-link 10.0.0.1 281 10.10.21.0 255.255.255.0 On-link 10.10.21.181 301 10.10.21.181 255.255.255.255 On-link 10.10.21.181 301 10.10.21.255 255.255.255.255 On-link 10.10.21.181 301 127.0.0.0 255.0.0.0 On-link 127.0.0.1 331 127.0.0.1 255.255.255.255 On-link 127.0.0.1 331 127.255.255.255 255.255.255.255 On-link 127.0.0.1 331 192.168.56.0 255.255.255.0 On-link 192.168.56.1 281 192.168.56.1 255.255.255.255 On-link 192.168.56.1 281 192.168.56.255 255.255.255.255 On-link 192.168.56.1 281 224.0.0.0 240.0.0.0 On-link 127.0.0.1 331 224.0.0.0 240.0.0.0 On-link 10.10.21.181 301 224.0.0.0 240.0.0.0 On-link 192.168.56.1 281 224.0.0.0 240.0.0.0 On-link 10.0.0.1 281 255.255.255.255 255.255.255.255 On-link 127.0.0.1 331 255.255.255.255 255.255.255.255 On-link 10.10.21.181 301 255.255.255.255 255.255.255.255 On-link 192.168.56.1 281 255.255.255.255 255.255.255.255 On-link 10.0.0.1 281 =========================================================================== Persistent Routes: None IPv6 Route Table =========================================================================== Active Routes: If Metric Network Destination Gateway 1 331 ::1/128 On-link 47 281 fe80::/64 On-link 4 281 fe80::/64 On-link 13 301 fe80::/64 On-link 13 301 fe80::14f:78ac:ef5:ee8b/128 On-link 4 281 fe80::2457:af67:45f4:7d18/128 On-link 47 281 fe80::d466:173f:3d9f:8a4e/128 On-link 1 331 ff00::/8 On-link 47 281 ff00::/8 On-link 4 281 ff00::/8 On-link 13 301 ff00::/8 On-link =========================================================================== Persistent Routes: None </code></pre> <p>Any assistance would be greatly appreciated as I am about to loose last hair over this thing...</p> <p>I recall that some time ago I was solving something like this by adding missing routing somewhere (guest or host) but can't remember what exactly nor can I find any help online...</p> <p><strong>[EDIT] - Resolved</strong>, after 2 days of biting keyboard over it... </p> <p>The problem was some weird interaction between networking stack, virtualbox adapters and NordVPN/NordVPN TAP Driver. Everything was working fine together before last windows update and went belly up after that.</p> <p>I have uninstalled NordVPN and related TAP driver, uninstalled network interfaces and let windows reinstall them after restart. Now it is working as expecting. I will now try to reinstall Nord VPN on top of it and see if it still works.</p>
0non-cybersec
Stackexchange
How to use Admin SDK with limited privileges on Firestore?. <p>I have some trouble with Cloud function and firestore rules. I would like use cloud function with limited privilèges on Firestore and give only has access as defined in the Security Rules</p> <p>It's working without problem on RTDB but not on Firestore.</p> <p>I have try with this rules </p> <pre><code>service cloud.firestore { match /databases/{database}/documents { match /init/{ID=**} { allow read, write: if true; } match /test/{ID=**} { allow read, write: if false; } } } </code></pre> <p>And this </p> <pre><code>const admin = require('firebase-admin'); const functions = require('firebase-functions'); const FieldValue = require('firebase-admin').firestore.FieldValue; admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: 'https://******.firebaseio.com', databaseAuthVariableOverride: { uid: 'my-worker', }, }); const db = admin.firestore(); exports.onTestRights = functions.firestore .document('init/{initID}') .onCreate((event) =&gt; { const initID = event.params.initID; return db.collection('test').doc(initID).set({'random key': 'random value'}).then(()=&gt;{ console.log('working'); return; }).catch((err) =&gt;{ console.log('error: ', err); return; }); }); </code></pre> <p>But it's still writing so whereas it should be "permission denied"</p> <p>Anyone know if it's normal(or not yet implanted) on firestore or I have misunderstood something ?</p> <p><strong>Edit:</strong> Of course my final goal is not with this rules, but only give write/read access on some documents/collections using (<code>allow read, write: if request.auth.uid == 'my-worker';</code>)</p> <p><strong>Edit2:</strong> I would like use the security rules for checking like a transaction if no change during process <a href="https://i.stack.imgur.com/sRlGV.png" rel="nofollow noreferrer">using this model </a></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
Position image next to a text within an adjustbox created in a newenvironment. <p>I try to create a box with a gray background color, where there is a centered image on the left and a text on the right side of the box. It should look like the boxes created in <a href="https://bookdown.org/yihui/bookdown/custom-blocks.html" rel="nofollow noreferrer">here</a>. Here's a short reproducable example. </p> <pre class="lang-latex prettyprint-override"><code> \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[british]{babel} \usepackage[T1]{fontenc} \usepackage[table]{xcolor} \definecolor{lightgray}{HTML}{f5f5f5} \usepackage{adjustbox} \usepackage{fontawesome} \newenvironment{idea} {% \begin{adjustbox}{minipage=[b] {380px},margin=1ex,bgcolor=lightgray,env=center}\faCoffee } {% \end{adjustbox}% } \begin{document} \begin{idea} I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. \end{idea} \begin{tabular}{p{1cm}p{11cm}} \vspace{0.7em} \Huge \faCoffee &amp; I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. \\ \end{tabular} \end{document} </code></pre> <p>It's important that the box is created through <code>\newenvironment</code>.</p> <p><a href="https://i.stack.imgur.com/eECnZ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eECnZ.jpg" alt="enter image description here"></a></p> <p>I already tried to use a <code>tabular</code> but I have no idea how to integrate it into the <code>adjustbox</code>. The final result should look like the second example with the icon being centered and with gray background. </p> <p>Any help is greatly appreciated! </p> <p>UPDATE:</p> <p>I played around a little and got a pretty hacky solution for this one case, but I need something more flexible. It should look like this though: </p> <pre class="lang-latex prettyprint-override"><code>\renewcommand{\arraystretch}{1.5} \newenvironment{warning} {% \begin{centering} \begin{tabular}{p{0.1\linewidth}p{\linewidth}} \rowcolor{lightgray} \vspace{0.5em} \hspace{0.7em} \Huge \faWarning &amp; } {% \end{tabular} \end{centering} } \begin{warning} I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. I hope it works. \end{warning} </code></pre> <p><a href="https://i.stack.imgur.com/jUluS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jUluS.jpg" alt="enter image description here"></a></p>
0non-cybersec
Stackexchange
Merry Belated Christmas to meeee <3.
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
Not able to access internet after connecting to VPNC. <p>I am using VPNC-client to connect to my <code>office-network</code>. It is working fine. </p> <p>My machine is <strong>ubuntu16.04</strong>.</p> <p>But when I get connected to <code>VPN</code>, I can not access to the public internet or <code>google.com</code></p> <p><strong>ifconfig</strong>(When VPN is connected)</p> <pre><code>br-1b5f9a5d3ef3 Link encap:Ethernet HWaddr 02:42:02:97:fc:19 inet addr:171.18.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 inet6 addr: fe80::42:2ff:fe97:fc19/64 Scope:Link UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1202 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:137378 (137.3 KB) docker0 Link encap:Ethernet HWaddr 02:42:e6:dd:41:9c inet addr:172.17.0.1 Bcast:0.0.0.0 Mask:255.255.0.0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) enp3s0 Link encap:Ethernet HWaddr 3c:97:0e:52:9c:4b inet addr:192.168.1.124 Bcast:192.168.1.124 Mask:255.255.255.255 inet6 addr: fe80::f45:59f7:5048:911c/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:523084 errors:0 dropped:80 overruns:0 frame:0 TX packets:628988 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:212687829 (212.6 MB) TX bytes:247005317 (247.0 MB) Interrupt:19 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:53197 errors:0 dropped:0 overruns:0 frame:0 TX packets:53197 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:5917170 (5.9 MB) TX bytes:5917170 (5.9 MB) tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:11.129.222.84 P-t-P:10.129.222.84 Mask:255.255.255.255 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1412 Metric:1 RX packets:317 errors:0 dropped:0 overruns:0 frame:0 TX packets:1996 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:78204 (78.2 KB) TX bytes:532254 (532.2 KB) wlp2s0 Link encap:Ethernet HWaddr 67:94:23:38:c2:f5 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:2 errors:0 dropped:0 overruns:0 frame:777078 TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:226 (226.0 B) TX bytes:143 (143.0 B) Interrupt:17 </code></pre> <p><strong>route</strong> (Before VPNC connected)</p> <pre><code>Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.1.1 0.0.0.0 UG 100 0 0 enp3s0 link-local * 255.255.0.0 U 1000 0 0 br-1b5f9a5d3ef3 182.17.0.0 * 255.255.0.0 U 0 0 0 docker0 182.18.0.0 * 255.255.0.0 U 0 0 0 br-1b5f9a5d3ef3 192.168.1.1 * 255.255.255.255 UH 100 0 0 enp3s0 192.168.1.124 * 255.255.255.255 UH 100 0 0 enp3s0 oo-234.officeweb 192.168.1.1 255.255.255.255 UGH 0 0 0 enp3s0 255.255.255.0 * 255.255.255.255 UH 100 0 0 enp3s0 </code></pre> <p><strong>route</strong> (After VPNC connected)</p> <pre><code>kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default * 0.0.0.0 U 0 0 0 tun0 default 192.168.1.1 0.0.0.0 UG 100 0 0 enp3s0 10.129.222.84 * 255.255.255.255 UH 0 0 0 tun0 link-local * 255.255.0.0 U 1000 0 0 br-1b5f9a5d3ef3 182.17.0.0 * 255.255.0.0 U 0 0 0 docker0 182.18.0.0 * 255.255.0.0 U 0 0 0 br-1b5f9a5d3ef3 192.168.1.1 * 255.255.255.255 UH 100 0 0 enp3s0 192.168.1.124 * 255.255.255.255 UH 100 0 0 enp3s0 oo-234.officeweb 192.168.1.1 255.255.255.255 UGH 0 0 0 enp3s0 255.255.255.0 * 255.255.255.255 UH 100 0 0 enp3s0 </code></pre> <p><strong>Edit: 1</strong></p> <p><strong>route</strong> (after <code>route del default dev tun0</code>)</p> <pre><code>Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface default 192.168.1.1 0.0.0.0 UG 100 0 0 enp3s0 default 192.168.43.1 0.0.0.0 UG 600 0 0 wlp2s0 11.12.222.107 * 255.255.255.255 UH 0 0 0 tun0 link-local * 255.255.0.0 U 1000 0 0 br-1b5f9a5d3ef3 171.17.0.0 * 255.255.0.0 U 0 0 0 docker0 172.18.0.0 * 255.255.0.0 U 0 0 0 br-1b5f9a5d3ef3 192.168.1.1 * 255.255.255.255 UH 100 0 0 enp3s0 192.168.1.124 * 255.255.255.255 UH 100 0 0 enp3s0 192.168.43.0 * 255.255.255.0 U 600 0 0 wlp2s0 oo-234.officeweb 192.168.1.1 255.255.255.255 UGH 0 0 0 enp3s0 255.255.255.0 * 255.255.255.255 UH 100 0 0 enp3s0 </code></pre>
0non-cybersec
Stackexchange
Chance The Rapper 2 years ago performing "Nostalgia" at library in Chicago.
0non-cybersec
Reddit
Poll: Ugliest car of all time?. My Top Picks 1.) [Fiat Multipla](http://upload.wikimedia.org/wikipedia/commons/thumb/e/e0/Fiat_Multipla_silver_front.JPG/280px-Fiat_Multipla_silver_front.JPG) 2.) [Ford Scorpio](http://gomotors.net/pics/Ford/ford-scorpio-ii-06.jpg) 3.) [Lancia Y](http://upload.wikimedia.org/wikipedia/commons/2/2c/Lancia_Y_1.2_Fire_rear.JPG) 4.) [SSangYong Rodius](http://gomotors.net/pics/Ssangyong/ssangyong-rodius-03.jpg) 5.) [SsangYong Korrado](http://assets.carbuzz.co.uk/blog/Ssangyong+korrando.jpg) (or any SsangYong for that matter) Let's hear what yours are.
0non-cybersec
Reddit
Why does Michael J Fox make the best milkshakes?. Because he uses the best ingredients.
0non-cybersec
Reddit
The shortest route through all European capital cities [x-post http://www.reddit.com/r/MapPorn/comments/1i9m8r/ ].
0non-cybersec
Reddit
Go’s Type System Is An Embarrassment.
0non-cybersec
Reddit
The Way, Way Back is the antidote to summer overload. "More introverted lead characters are needed in film, even if it’s just to break the cycle of fucking shouting".
0non-cybersec
Reddit
lowest achievable watts for decent resolution display?. <p>I have an unusual question. The scenario is onboard computing / entertainment for a live aboard boat with a very tight energy budget. I'm trying to figure out what is the most energy efficient display technology that is capable or pretty high resolutions? </p> <p>Is it LCD or perhaps pico projectors are starting to get into the HD arena? Do 1080p pico projectors exist yet? </p> <p>I'm considering the possibility of a pico projector because there's usually not very much light below deck. </p>
0non-cybersec
Stackexchange
Day off? Got a cool new toy in the mail? Time to play! CCW.
0non-cybersec
Reddit
Relationship between $\Sigma_{1}$ and $\Pi_{1}$ functions (Logic). <p>I am working on the following homework problem for a logic class on Godel's incompleteness theorems and the following question is asked.</p> <blockquote> <p>Is the converse of Theorem $13.1$ true? Explain.</p> </blockquote> <p>Theorem 13.1 states, "If a function is $\Sigma_{1}$ it is also $\Pi_{1}$." So, we are asked to prove or disprove that, "If a function is $\Pi_{1}$ it is also $\Sigma_{1}$." I think that the converse is true and I have attempted the question by giving the following "proof",</p> <blockquote> <p>Assume that $f$ is a $\Pi_{1}$ function. That is, $f$ can be expressed by a strictly $\Pi_{1}$ wff. Let $\Phi(x,y):=\forall \eta_{1} \cdot \cdot \cdot \forall \eta_{k} \varphi(x,y)$ be such a $\Pi_{1}$ wff, where $\varphi(x,y)$ is $\Delta_{0}$. Well, by DeMorgan's law for quantifiers, we have that $\forall \eta_{1} \cdot \cdot \cdot \forall \eta_{k} \varphi(x,y) \equiv \exists \eta_{1} \cdot \cdot \cdot \exists \eta_{k} \neg \varphi(x,y)$, where $\neg \varphi(x,y)$ is again $\Delta_{0}$. So, $\Phi(x,y) = \exists \eta_{1} \cdot \cdot \cdot \exists \eta_{k} \neg \varphi(x,y)$ still expresses $f$ and so since $\Phi(x,y)$ is not only $\Pi_{1}$, but $\Sigma_{1}$, we conclude that $f$ is also $\Sigma_{1}$.</p> </blockquote> <p>This seems to be a sufficient argument for my tastes (disregard my idiotic proof), but the proof the book gave for Theorem 13.1 seems to be of quite a different style, I will post it here:</p> <blockquote> <p>Suppose the one-place function $f$ can be expressed by the strictly $\Sigma_{1}$ wff $\varphi(x,y)$. Since $f$ is a function, and maps numbers of unique values, we have $f(m) =n$ if and only if $\forall z ( f(m) = z \rightarrow z = n)$. Hence $f(m)=n$ if and only if $\forall z(\varphi(\bar{m},z) \rightarrow z= \bar{n})$ is true. In other words, $f$ is equally well expressed by $\forall z(\varphi(x,z) \rightarrow z=y)$. But it is a trivial exercise of moving quantifiers around to show that if $\varphi(x,y)$ is strictly $\Sigma_{1}$, then $\forall z(\varphi(x,z) \rightarrow z=y)$ is $\Pi_{1}$.</p> </blockquote> <p>(Note that, $\bar{x}$ means the value of $x$, meaning $\underbrace{S \cdot \cdot \cdot S}_\text{x times}0$).</p> <p>It seems that the book is actually using an explicit wff to express $f$, in my case I just keep $\Phi$ as some ethereal wff which we assume expresses $f$; is there any problem with this? I essentially want to know if my proof is adequate, and if not where I went wrong or what I misunderstand. It seems to me utterly trivial to prove both Theorem 13.1 and its converse if the method I provided is correct, which is why I suspect that my method is incorrect. Any suggestions and nudges in the right direction would be greatly appreciated, thank you!</p>
0non-cybersec
Stackexchange
Postgresql and comparing to an empty field. <p>It seems that in PostgreSQL, <code>empty_field != 1</code> (or some other value) is <strong>FALSE</strong>. If this is true, can somebody tell me how to compare with empty fields? </p> <p>I have following query, which translates to "select all posts in users group for which one hasn't voted yet:</p> <pre><code>SELECT p.id, p.body, p.author_id, p.created_at FROM posts p LEFT OUTER JOIN votes v ON v.post_id = p.id WHERE p.group_id = 1 AND v.user_id != 1 </code></pre> <p>and it outputs nothing, even though <strong>votes</strong> table is empty. Maybe there is something wrong with my query and not with the logic above?</p> <p><strong>Edit:</strong> it seems that changing <code>v.user_id != 1</code>, to <code>v.user_id IS DISTINCT FROM 1</code>, did the job. From PostgreSQL docs:</p> <blockquote> <p>For non-null inputs, IS DISTINCT FROM is the same as the &lt;> operator. However, when both inputs are null it will return false, and when just one input is null it will return true.</p> </blockquote>
0non-cybersec
Stackexchange
Date time format problem in c#. <p>Hi I'm working with c# simple application to display system date time.</p> <pre><code>textbox.Text = DateTime.Now.ToString("MM/dd/yyyy"); </code></pre> <p>but it is showing result as : 05-12-2010</p> <p>What is the problem with this code? or do I need to change any where in the regional settings of my machine.</p> <p>thank you</p>
0non-cybersec
Stackexchange
Bibliography with enumerate. <p>I have the following MWE</p> <pre><code>\documentclass[12pt, A4paper]{article} \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{lscape} \usepackage{rotating} \usepackage{bm} \usepackage{epstopdf} \usepackage[nodayofweek]{datetime} \usepackage{setspace} \usepackage[left=2cm, right=2cm, top=2cm,bottom=2cm]{geometry} \newcommand{\overbar}[1]{\mkern 1.5mu\overline{\mkern-1.5mu#1\mkern-1.5mu}\mkern 1.5mu} \begin{document} \section{References} \begin{enumerate} \item Autor, David, David Dorn, Gordon Hanson, and Kaveh Majlesi (2016). ``A Note on the Effect of Rising Trade Exposure on the 2016 Presidential Election.'' Mimeo, MIT Department of Economics. \item Baldwin, Richard (2016). \emph{The Great Convergence. Information Technology and the New Globalization}. Cambridge: Harvard University Press. \item Baumeister, Roy F. and Mark R. Leary (1995). ``The Need to Belong: Desire for Interpersonal Attachments as a Fundamental Human Motivation''. \emph{Psychological Bulletin}, 117:497-529. \item Bavetta, Sebastiano and Francesco Guala, (2003). ``Autonomy Freedom and Deliberation''. \emph{Journal of Theoretical Politics}, 15: 423-443. \end{enumerate} \end{document} </code></pre> <p>The above is a bibliography for a paper. When I use enumerate each reference is marked as 1. and so on. I would like to have [1] instead. I know that I can reach that result by using an appropriate style and bibtex. However, I need to use enumerate. Any hint about? Thanks in advance</p>
0non-cybersec
Stackexchange
MS BOT Framework (adaptive cards): How to send value (Stepcontext.Value) from directline. <p>I have deployed a Bot in Azure, the Bot displays a welcome message OnMemberAdd. Its adaptive card so the entered value are sent to stepcontext.value. I have integrated it with multiple channels, for directline, I would like to bypass the welcome card and pass the message directly to stepcontext.value so the second prompt is displayed instead of first. I have tried the below but it does not work, please help.</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en-US"&gt; &lt;head&gt; &lt;title&gt;Web Chat: Send welcome event&lt;/title&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&gt; &lt;script src="https://cdn.botframework.com/botframework-webchat/latest/webchat.js"&gt;&lt;/script&gt; &lt;style&gt; html, body { height: 100%; } body { margin: 0; } #webchat { height: 100%; width: 100%; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="webchat"&gt;&lt;/div&gt; &lt;script&gt; (async function() { // In this demo, we are using Direct Line token from MockBot. // Your client code must provide either a secret or a token to talk to your bot. // Tokens are more secure. To learn about the differences between secrets and tokens // and to understand the risks associated with using secrets, visit https://docs.microsoft.com/en-us/azure/bot-service/rest-api/bot-framework-rest-direct-line-3-0-authentication?view=azure-bot-service-4.0 const { token } = { token}; // We are using a customized store to add hooks to connect event const store = window.WebChat.createStore({}, ({ dispatch }) =&gt; next =&gt; action =&gt; { if (action.type === 'DIRECT_LINE/CONNECT_FULFILLED') { dispatch({ type: 'WEB_CHAT/SEND_EVENT', payload: { name: 'userInfo', value: { fname:'user', lname:'test', pnumber:'0678775453'} } }); } return next(action); }); const styleOptions = { botAvatarImage: '', botAvatarInitials: 'Chatbot', userAvatarImage: '', userAvatarInitials: 'User', showNub: true, bubbleFromUserNubOffset: 'bottom', bubbleFromUserNubSize: 10, bubbleFromUserBorderColor: '#0077CC', bubbleNubOffset: 'top', bubbleNubSize: 0, bubbleBorderColor: '#009900', sendBoxButtonColor: '#009900', hideUploadButton: true, hideSendBox : true }; window.WebChat.renderWebChat( { directLine: window.WebChat.createDirectLine({ token }), store, styleOptions }, document.getElementById('webchat') ); document.querySelector('#webchat &gt; *').focus(); })().catch(err =&gt; console.error(err)); &lt;/script&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>I have tried to send the data via postman and it works well but when I do it using above code it does not work.</p> <p>Postman body</p> <pre><code>{ "type": "message", "from": { "id": "user1" }, "value": { "fname":"user", "lname":"test", "pnumber":"0678787543" } } </code></pre>
0non-cybersec
Stackexchange
Meanwhile in Dubai.
0non-cybersec
Reddit
[WDYWT] Part of breaking in this jacket was me sleeping in it. Twice..
0non-cybersec
Reddit
Bond girl from Goldfinger Tania Mallet (77) died.
0non-cybersec
Reddit
Caught some Aurora over Rowena Crest in Oregon this morning. [OC].
0non-cybersec
Reddit
TIL that sound you hear when your on the beach and just wanted to dance like crazy!.
0non-cybersec
Reddit
After denying racism, videos of Meadows vowing to send Obama 'home to Kenya' resurface.
0non-cybersec
Reddit
Example of the semisimple ring $R$ but $R^{{\rm op}}$ is not.. <p>Is there any example of this kind of rings? i don't have any imagine of this rings, if they are exist!</p>
0non-cybersec
Stackexchange
Cristiano Ronaldo - a fellow squatter. http://www.youtube.com/watch?v=GtMGJ42ntYU
0non-cybersec
Reddit
PSA: IMPORTANT - If you are browsing this sub on your phone, please upvote....
0non-cybersec
Reddit
Jacques Pépin's thoughts on reality cooking shows.
0non-cybersec
Reddit
Splitting data between wifi networks for security. <p>Does there exist, software or technology, that can use more than one wifi network, in such a way that only part of the data travels through each 'side'? You would probably need an end address like a proxy. Something similar to TOR, except each primary network wouldn't be able to intercept all the data sent or received.</p>
0non-cybersec
Stackexchange
Android unit test using ant with library project. <p>It seems that also the latest android SDK tools still don't properly support testing of applications that contain linked library projects.</p> <p>I have a project with the following setup:</p> <p>TestLib (android library project) &lt;- TestMain (android project) &lt;- TestMainTest (android unit test project)</p> <p>I created all those projects in eclipse and then used <code>android update (test-/lib-)project ...</code> to generate the <code>build.xml</code> et. al.</p> <p>The problem starts as soon as you have a class in TestMain (<code>InheritAddition.java</code> in my example) that inherits from a class in TestLib (<code>Addition.java</code>) and you want to reference this class in the unit test (<code>InheritAdditionTest.java</code>).</p> <h2>TestLib</h2> <pre><code>public class Addition { public int add2(int o1, int o2) { return o1 + o2; } } </code></pre> <h2>TestMain</h2> <pre><code>public class InheritAddition extends Addition { public int sub(int p1, int p2) { return p1 - p2; } } </code></pre> <h2>TestMainTest</h2> <pre><code>public class InheritAdditionTest extends AndroidTestCase { public void testSub() { Assert.assertEquals(2, new InheritAddition().sub(3, 1)); } } </code></pre> <p>When building on the command line the result is the following:</p> <pre> W/ClassPathPackageInfoSource(14871): Caused by: java.lang.NoClassDefFoundError: org/test/main/InheritAddition W/ClassPathPackageInfoSource(14871): ... 26 more W/ClassPathPackageInfoSource(14871): Caused by: java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation W/ClassPathPackageInfoSource(14871): at dalvik.system.DexFile.defineClass(Native Method) W/ClassPathPackageInfoSource(14871): at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:195) W/ClassPathPackageInfoSource(14871): at dalvik.system.DexPathList.findClass(DexPathList.java:315) W/ClassPathPackageInfoSource(14871): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:58) W/ClassPathPackageInfoSource(14871): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) W/ClassPathPackageInfoSource(14871): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) W/ClassPathPackageInfoSource(14871): ... 26 more W/dalvikvm(14871): Class resolved by unexpected DEX: Lorg/test/main/InheritAddition;(0x41356250):0x13772e0 ref [Lorg/test/lib/Addition;] Lorg/test/lib/Addition;(0x41356250):0x13ba910 </pre> <p>I found some workaround that works for eclipse:</p> <p><a href="https://stackoverflow.com/questions/2472059/cant-build-and-run-an-android-test-project-created-using-ant-create-test-proje">Can&#39;t build and run an android test project created using &quot;ant create test-project&quot; when tested project has jars in libs directory</a></p> <p>That does the trick, but I am looking for a solution that works with ANT (more precisely I am looking for a solution that works on both at the same time).</p> <p>The documented approach (by changing build.xml to include jars from the main project into the class path) is not applicable here as the sample project doesn't use any library jars (also I believe that this particular problem is now fixed with SDK tools r16).</p> <p>I guess the brute force way of solving that is to try and somehow remove the dependencies of <code>TestMainTest</code> to <code>TestLib</code> (by modifying <code>project.properties</code>) and instead manage to hack the build script to put those built jars into the class path (so replace the <code>-compile</code> target with something that modifies the class path for <code>javac</code>). Since I have a long history of trying to keep up with android SDK toolchain changes, this is not really my favorite option as it is a) rather complicated and b) requires constant modification of the <code>build.xml</code> whenever the toolchain changes (which is quite frequently).</p> <p>So I am looking for ideas of how to get such a setup working without using the sledge hammer. Maybe I am missing something totally obvious but for me this use case is fairly standard and I have a hard time understanding why this isn't supported out of the box.</p>
0non-cybersec
Stackexchange
Generating function of $\frac{h(x)}{(1-x)^2}$. <blockquote> <p>If <span class="math-container">$h(x)$</span> is the generating function for <span class="math-container">$a_r$</span>, what is the generating function of <span class="math-container">$$\frac{h(x)}{(1-x)^2}$$</span></p> </blockquote> <p>Let <span class="math-container">$h(x)$</span> be written as</p> <p><span class="math-container">$$h(x) = \sum_{r} a_r x^r $$</span></p> <p>Consider more simply</p> <p><span class="math-container">$$\frac{h(x)}{1-x} = \frac{1}{1-x} h(x) =\sum_{r} x^r \sum_{r} a_r x^r$$</span></p> <p>I tried to expand this and see what I could get</p> <p><span class="math-container">$$(1+x+x^2+x^3+\dots+x^r+\dots)(a_0+a_1x+a_2x^2+a_3x^3+\dots+a_rx^r+\dots)$$</span></p> <p>there are two ways to simplify the product, either</p> <p><span class="math-container">$$a_0(1+x+x^2+\dots)+a_1(x+x^2+x^3+\dots)+ a_2(x^2+x^3+x^4+\dots)+\dots= \sum_ra_r\sum_{k\ge r}x^k$$</span></p> <p>or <span class="math-container">$$a_0 + (a_0+a_1)x+(a_0+a_1+a_2)x^2+(a_0+a_1+a_2+a_3)x^3 = \sum_r \left(\sum_{k\le r}a_k \right)x^r$$</span></p> <p>obviously this is only for one factor of <span class="math-container">$\frac{1}{1-x}$</span> but I assume If I can get help for this I can extend it to two factors.</p> <p>I'm not sure what form the answer is expected to be in? Because I could say the generating function is</p> <p><span class="math-container">$$\frac{h(x)}{1-x} = h\left(\sum_{k \ge r}x^k\right)$$</span></p> <p>but I'm not sure that makes any sense. I was expecting to say something like</p> <p><span class="math-container">$$\frac{h(x)}{1-x} \mapsto h(x^2)$$</span></p> <p>(the <span class="math-container">$x^2$</span> is not intentional, just some idea of what I believe the answer could look like)</p> <p>Any help for the case of <span class="math-container">$\frac{1}{1-x}$</span> would be great and then I could extend it to <span class="math-container">$\frac{1}{(1-x)^2}$</span></p>
0non-cybersec
Stackexchange
My holy trinity.
0non-cybersec
Reddit
Power series in complex analysis. <p>We derived from cauchy's integral formula that a holomorphic function converges locally in a power series. Now we had the <a href="http://en.wikipedia.org/wiki/Identity_theorem" rel="nofollow">Identity theorem</a> and I wanted to know whether I can conclude from this that the power series of a function is uniquely determined and converges on the whole domain of the function(which should be assumed to be connted and open) and not just locally anymore?</p>
0non-cybersec
Stackexchange
Student proves existence of plasma tubes floating above Earth.
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
Modulo expansion with divisor multiples. <p>Is there any general expansion for 'a mod mn' ?<br> mod is modulo operation: <a href="http://en.wikipedia.org/wiki/Modulo_operation" rel="nofollow">http://en.wikipedia.org/wiki/Modulo_operation</a></p> <pre><code>Eg: we have (a + b ) mod n = ((a mod n) + (b mod n)) mod n (a x b ) mod n = ((a mod n) x (b mod n)) mod n Similarly, Is there any simplification/expansion for : a mod (m x n) = ? </code></pre> <p>Thanks</p> <p>Edit: Added example for clarification</p>
0non-cybersec
Stackexchange
[Photo] Side by side, with a misprinted derpy torchic.McDonalds, anyone?.
0non-cybersec
Reddit
Oh dear indeed..
0non-cybersec
Reddit