body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I use windows 7 and every install I've ever had starts to start up really slow after several months of use. Instead of trying to speed it up (like I already did with pretty much every widespread tweek out there), I want to know what is slowing down my windows 7 startup. It goes a good minute after the logon screen, with nothing running, with 0% - 1% CPU usage and only after that period of time it opens the programs that I've already clicked, which leads me to believe there's something deliberately delaying my programs initialization and I want to know what
When I start my PC, it boots into Windows (Windows 7 32-bit) quite happily, I login and the main Windows screen appears. At that point, however, the system is extremely unresponsive for up to 5 minutes - if I click on Firefox to start it, nothing appears to happen for a long time, etc, etc. The mouse and Windows UI is responsive, but programs take forever to start, webpages seem to hang (or at least load extremely slowly) and so on. I imagine that the issue is with one or more programs that run on startup, but I don't know quite how to identify which one it might be. The event log shows nothing of any obvious interest. I can't see any high CPU activity in task manager or Process Explorer, and I can't hear any high disk activity. I'd rather understand what's happening and then work out how to address it, than have to go for a blind "switch things off and see what helps" approach, but maybe that's being optimistic :-) I suspect disk bottlenecks or network, but I don't know how I could set something up to diagnose this (and in particular, given that I can't get programs to start in a timely manner, I'd prefer something that automatically starts and logs data for later analysis than something like Process Explorer, which always leaves me worrying that by the time it started the problem had gone away :-) I guess my ideal would be 2 things: Something that gave me an overall "what are the current key bottlenecks in this system" summary (ideally, which could be set to run in the background and collect data for later analysis). Some means of starting a program (say, Firefox) and have it record what was going on in terms of waits and delays in the system. Unfortunately, I've never really found anything like either of these. I'm not a professional systems admin - my background is database admin - so if there are "obvious" tools to look at or try, then I'd be grateful to know of them (particularly if the information they give is easy for an amateur to analyze) :-)
For example, if I wanted to say, "This student is large.", would it be proper to instead say, "This student's large."? I don't recall ever reading something like this, but I remember hearing people speak like this. Is this purely a speaking shortcut or is it also proper to write as well?
How compelled should I feel to use non-contracted forms (do not rather than don't and so on) when writing in a rather formal text, say an academic paper? In one case I am afraid to seem too stilted, in the other, too casual. Are there good guidelines? And are there differences in this regard between British and American English? (In this there was not much more than "Contractions are more frequent in informal than formal contexts".)
I want to extrude these edges outward so that they are all the same length from their origin edge. Does anyone know how I could do this without doing each edge individually?
Is there an operation similar to inset that creates faces in the opposite direction? That is, instead of creating faces inwards, they create faces outwards? A normal inset operation: What I would like:
When I run sudo apt-get update on Ubuntu Server 14.04, it seems to be making a lot of requests to http:// sources. I would expect that something as important (and dangerous!) as updates would be handled over an encrypted connection (https://) but it appears it isn't. Why is that?
Does apt-get use https or any kind of encryption? Is there a way to configure it to use it?
I know how to do the commands already, but I can't seem to be able to get to do it all in one command, because I can't target an already made item so I can enchant, but not name/ give it lore.
I have heard it was possible to change the names and lores of Minecraft items WITHOUT the use of third-party programs like MCEdit. Given the things that my friends have told me, and from the information gathered online, my guess is that, since Minecraft has started using JavaScript, /give @p 35 1 14 {name:"Red Wool",lore:"bob"}. Whenever I run this command block, all I get is a piece of Red Wool with no Lore, nor a name. I also get no errors in this process.
I'm trying to find a book I remember reading a long time ago. In it the main character could teleport or "cast" objects. A few of the details I remember (here's hoping I don't have multiple books mixed in my mind): Teleporters could cast 1000 kg and not a bit more. They had to go to a school to learn to compensate for momentum differences between the start and the target location. The main character ran into someone who called themselves an 'anchor' who could block the teleportation. They got past the anchor by teleporting drugs meant for him directly into the anchor. I think there was a part at the beginning about someone who seemed to be in withdrawal finding him as a baby by following a ringing noise and saying he had 'rung a gold' or something like that. The guy seemed to recover once he hung around the boy and trained him. That last part could be a different book however...
I could swear that I got this answered once via the TVTropes YKTS forum, but all I can find is my failed query. It's a Sci-fi novel, involves the last member of an alien race saying that a particular child will be a savior of the galaxy. Everyone assumes that this means that he will be able to transcend the teleportation limits (if I recall correctly, they could teleport up to some amount, say 22 kilograms, but the moment they added a gram more, it failed). His father was a former football player and it was referenced a few times that he used a football carry for the baby with the head in one hand and the rest of the body on one forearm. The parents were killed by some sort of extremists and the boy was tested for his teleportation abilities and they found that he couldn't transcend the limit. And... that's about all I remember. I read it in middle school, I believe, so that means it was definitely published before 2000 and likely before 1994.
The shellscript is very simple: retroarch $* -c /tmp/retroarch/Data/retroarch/gambatte.cfg ("retroarch" is another shellscript) If the filename passed contains spaces it fails: RetroArch [ERROR] :: Could not read ROM file.
I wrote the following script to diff the outputs of two directores with all the same files in them as such: #!/bin/bash for file in `find . -name "*.csv"` do echo "file = $file"; diff $file /some/other/path/$file; read char; done I know there are other ways to achieve this. Curiously though, this script fails when the files have spaces in them. How can I deal with this? Example output of find: ./zQuery - abc - Do Not Prompt for Date.csv
I am currently using a wizard. I was wondering, if I decided to take a feat that would allow me to use heavier than light armor, would that affect my spellcasting? I thought I read something about it in the rule book but I can't find it.
I've just read the , and I'm not sure I'm up to speed regarding casting spells while clad in armor. The only mention I can find about this (page 79): Because of the mental focus and precise gestures required for spellcasting, you must be proficient with the armor you are wearing to cast a spell. You are otherwise too distracted and physically hampered by your armor for spellcasting. Does this mean that a character who starts out with a single level fighter (or any other class with heavy armor proficiency) can from then on gain levels as wizard and forever more cast spells, without any penalty whatsoever, while wearing full plate? I've played all editions of D&D, and this seems both a bit overpowered and very un-D&D-ish to me. Have I missed something?
I am creating a dynamically generated html <ul> in jquery which has some <li> elements in it. I want an active class be added to any of the <li> elements by hovering. I've tried some functions in jquery but it won't change <li> elements, it will only work if I try it on <ul> element. Here is my html code: <div class="col-md-3 all_session_section" id="listRight"> <ul class="meeting_lists" id="meeting_lists"></ul> My Javascript code: $.ajax({ url: myURL, method: "GET", headers: { "Accept": "application/json; odata=verbose" }, success: function (data) { if (data.d.results.length > 0) { AllTask = data.d.results; html = ''; for (var i = 0; i < Number(AllTask.length); i++) { html += '<li class="pass" data-tab="tab-1">'; html += '<div class="clear_border_active"></div>'; html += '<a href="#">'; html += '<div class="title">' + AllTask[i].Title + '</div>'; html += '<div class="details d-flex justify-content-end align-items-center"><span class="salon mr-3">' + AllTask[i].meeting_place + '</span><span class="date">' + JDate + '</span></div></a></li>'; } document.getElementsByClassName('meeting_lists')[0].innerHTML = html; and my jquery function: $(".all_session_section ul > li").hover( function () { $(this).addClass("active"); }, function () { $(this).removeClass("active"); } ); if anyone can help me with this, I would really appreciate that.
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
So unbelievably I have never cleared my history in SMS/iMessages/Messages. Ostensibly, I should be able to scroll up and eventually see my first text message from my first gen iPhone. This is, unsurprisingly, taking up a considerable amount of space on my phone, but a big part of why I've never cleaned it out is that it contains a tremendous number of pictures of my daughters my wife has sent me over the years. It doesn't seem like these get saved to my photo roll and there doesn't appear to be any way to bulk export them. It may be worth noting that I use desktop messages in Yosemite and it seems work well, so there may be an approach I can use from that angle. What's the best way for me to archive all the photo attachments from almost seven years of text messages?
I am getting a new iPhone come next month. I want to save all of my nostalgic conversations for the future. Is there a way to transfer an entire chat log to the computer in plain text? Or will I have to painstakingly take screenshot after screenshot as I scroll up in the text history?
I just found out that the following code is not a valid C++ (it doesn't parse at int after ~): int x = 5; x.~int(); However, the following snippet does work: int32_t x = 5; x.~int32_t(); This is because int32_t is a typedef in my particular implementation of C++, and a destructor can, apparently, be called on any typedef'ed type. My question is: is any implementation of C++ required to allow the second snipped to compile? In particular, is int32_t guaranteed to be a typedef, and is the compiler required to allow a destruction of a typedef if it knows that typedef typedefs something to int?
In C++ the following code gives a compiler error: void destruct1 (int * item) { item->~int(); } This code is nearly the same, I just typedef the int to another type and something magic happens: typedef int myint; void destruct2 (myint * item) { item->~myint(); } Why does the second code work? Does an int get a destructor just because it has been typedefed? In case you wonder why one ever would like to do this: This comes from refactoring C++ code. We're removing the standard heap and replacing it with selfmade pools. This requires us to call placement-new and the destructors. I know that calling destructors for primitive types is useless, but we want them in the code nevertheless in case we later replace PODs with real classes. Finding out that naked int's don't work but typedefed ones do was quite a surprise. Btw - I have a solution that involves template-functions. We just typedef inside the template and everything is fine.
I'm currently working on a Regression Model involving multiple categorical variables. While researching on how to proceed on this I came across "Dummy Coding", which I'm totally fine with and later I stumbled upon "Effect Coding", which is bothering me with. I want to know, how do these two ways of coding differ and also what changes would it make to my model, if I code my Categorical variables with both these models separately. Would be highly helpful if someone could explain with some R code samples.
If you fit a linear model or a mixed model there are different types of codings available to transform a categorical or nominal varibale into a number of variables for which paramaters are estimated, such as dummy conding (the R default) and effects coding. I heard that effects coding (sometimes called deviation or contrast coding) is preferred when you have interactions, but what are the possible contrasts and when would you use which type of contrast? The context is mixed modeling in R using lme4, but I think broader responses are fine. Sorry, if I missed a similar question. EDIT: Two helpful links are: & explained.
I have come across some shots from other people and they create something like an illusion to me and trick me of the scale of the actual scenery. For example, this shot by on Unsplash made me think that this it is miniature; some sort of Meccano, plastic model or a 3D recreation. It looks too perfect and clean! Proof that it is actually real can be seen when you zoom-in and notice there's a person near the front of the bus, some too fine detail on the roof of the bus stop and some other details. I have tried to capture pictures in a similar style using a DJI Mavic Pro Platinum drone, tried editing with Photoshop, but I can't give my shots that feeling. What do you think the camera configuration and settings are? Is this effect entirely made with graphic manipulation? Any hint or advice will be highly appreciated!
I was browsing Behance and came upon these pictures: I was wondering how he got this miniature style effect? I'm guessing a Gaussian Blur on a strip of the picture in Photoshop...but couldn't get right. What's the step-by-step process for doing this with software? (For getting this effect with a special lens, see )
I have two files with the same number of words and column fields in each line. I want to append these two files word by word. For example: File 1: A1 B1 C1 D1 E1 B1 C1 File 2: A2 B2 C2 D2 E2 B2 C2 The output should be (the number of words should be respected): A1_A2 B1_B2 C1_C2 D1_D2 E1_E2 B1_B2 C1_C2
I have 2 large files (3000 columns, 15000 rows) of the following format file1 (tab-separated): 1/0 0/0 0/0 0/0 1/1 0/0 1/1 0/1 0/0 file2 (tab-separated): 3 5 2 1 7 10 3 4 3 I'd like to combine the values from the first column of each file with a ":" separator, then move on to the second, third, etc. columns. Desired output (tab-separated): 1/0:3 0/0:5 0/0:2 0/0:1 1/1:7 0/0:10 1/1:3 0/1:4 0/0:3 Efficiency isn't critical, so any language is fine. I apologize if this has been asked before.
Let let $$f(x,y)=\frac{x^3-y^3}{x^2+y^2}$$ and $(x,y)\not=(0,0)$ How to prove that the function has a limit as $(x,y)\to (0,0)$ Should I look at firstly on the x axis and then on y-axis?
In class, we were simply given that this limit is undefined since along the paths $y=\pm x$, the function is undefined. Am I right to think that this should be the case for any function, where the denominator is $x^2-y^2$, regardless of what the numerator is? Just wanted to see if this is a quick way to identify limits of this form. Thanks for the discussion and help!
I have a publish subscribe queue message listener method which fires an event when it reads a message in the queue & adds the message to a publisherPostListenerList in the ApplicationListener class. The messages added in the list are being pushed to multiple subscribers like real time notifications from the controller method. After pushing the message to a respective logged in user I am removing the message from the list to avoid the push of redundant message to the user also it keeps in check the size of the list. The problem is there is only single instance of publisherPostListenerList for all the logged in users. The list being an instance list there should be a separate copy for every logged in user but its not the case. Please correct me if I am wrong. If I delete a message it deletes the message from the publisherPostListenerList for all the subscribers. Now my questions are 1. Shouldn't there be an individual copy of publisherPostListenerList list for every logged in user, the list being an instance list. 2. How do I create a separate copy of list for all the logged In users P.S. I tried changing the bean scope to prototype but didn't work. Below is the ApplicationEventListener class which holds the list & the controller code. ApplicationListener.java @Component public class ApplicationEventListener { private List<Post> publisherPostListenerList = new CopyOnWriteArrayList<Post>(); private static final Logger logger = Logger.getLogger(ApplicationEventListener.class); @EventListener public void postSubmissionEventHandler(PostSubmissionEvent event) throws IOException { Post post = event.getPost(); logger.debug("application published user post received " + post); publisherPostListenerList.add(post); } public List<Post> getPublisherPostListenerList() { return publisherPostListenerList; } public void setPublisherPostListenerList(List<Post> publisherPostListenerList) { this.publisherPostListenerList = publisherPostListenerList; } } Controller method for pushing the message to the subscriber @RequestMapping(value="/getRealTimeServerPushUserPosts") public SseEmitter getRealTimeServerPushUserPosts(@RequestParam("userId") int userId){ SseEmitter sseEmitter = new SseEmitter(); CustomUserDetail myUserDetails = currentUserAccessor.getCurrentLoggedInUser(); User loggedInUser=myUserDetails.getUser(); List<Integer> userPublisherIDList = this.userService.loadUserPublisherIdListWhichLoggedInUserFollows(loggedInUser); List<Post> postList =eventListener.getPublisherPostListenerList(); for(Integer userPublisherId : userPublisherIDList){ for(Post post:postList){ if((userPublisherId.intValue()) == (post.getUser().getUserId().intValue())){ try { sseEmitter.send(post); postList.remove(post); //removes the post for all the subscribers as the list acts as a global list. } catch (IOException e) { logger.error(e); } } } } return sseEmitter; }
I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?
I'm using this command: gnome-open file_name.xxx(xxx file extension) command but it's not working. I'm using Ubuntu 14.04.
I used to work on the Mac terminal before and I used: open file2open.pdf and the PDF file would be opened on preview or whatever my default viewer was. When I use it in the terminal in Ubuntu I get this error message: Couldn't get a file descriptor referring to the console
Is it posible to compile Java source (which uses libraries like Swing etc) in an exe file, so the user doesn't need to install JavaSE? I am looking for some way to bundle a mini-JRE and the .jar in a single file (exe) or some way to compile everything (source and libraries) into native code. PS: Obviously I don't care about cross-compat for that program.
If I have a Java source file (*.java) or a class file (*.class), how can I convert it to a .exe file? I also need an installer for my program.
I need help in the following proposition: Let $f_n$ be a sequence of lebesgue measurable functions $f_n : [a,b] \rightarrow \mathbb{\overline{R}}$ then lim sup $f_n$, lim inf $f_n$ $[a,b] \rightarrow \mathbb{\overline{R}}$ are both lebesgue measurable functions. I don't know how to manipulate those functions to proove $ \{x\in[a,b]: f^*(x)> \alpha \} $ where $f^* $ is limit superior and $f_*$ is limit inferior
I need help to prove the following theorem Suppose $f$ is the pointwise limit of a sequence of $f_n$, $n = 1, 2, \cdots$, where $f_n$ is a Borel measurable function on $X$. Then $f$ is Borel measurable on $X$. My idea is to use the standard definition like for every $c$,$\{x:f(x)<c\}$ is Borel measurable. But got stuck as how to do it for sequence of $f_n$.
I want to align a text in a <label> or <span> element to this custom switch button: .switch { position: relative; display: inline-block; width: 60px; height: 34px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; -webkit-transition: .4s; transition: .4s; } .slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; -webkit-transition: .4s; transition: .4s; } input:checked+.slider { background-color: #2196F3; } input:focus+.slider { box-shadow: 0 0 1px #2196F3; } input:checked+.slider:before { -webkit-transform: translateX(26px); -ms-transform: translateX(26px); transform: translateX(26px); } /* Rounded sliders */ .slider.round { border-radius: 34px; } .slider.round:before { border-radius: 50%; } <span>Custom switch</span> <label class="switch"> <input type="checkbox" checked> <span class="slider round"></span> </label> I cannot get it working setting the margin or float on the switch class element.
I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? <div id="header"> <img src=".." ></img> <h1>testing...</h1> <img src="..."></img> </div>
I want to know, what is the largest prime number? I know prime numbers are whole numbers that cannot be divided by any whole number except 1 and themselves, I also know some primes like 2, 3, 5, 7, 11... But what is the largest prime number?
This is just a curiosity. I have come across multiple proofs of the fact that there are infinitely many primes, some of them were quite trivial, but some others were really, really fancy. I'll show you what proofs I have and I'd like to know more because I think it's cool to see that something can be proved in so many different ways. Proof 1 : Euclid's. If there are finitely many primes then $p_1 p_2 ... p_n + 1$ is coprime to all of these guys. This is the basic idea in most proofs : generate a number coprime to all previous primes. Proof 2 : Consider the sequence $a_n = 2^{2^n} + 1$. We have that $$ 2^{2^n}-1 = (2^{2^1} - 1) \prod_{m=1}^{n-1} (2^{2^m}+1), $$ so that for $m < n$, $(2^{2^m} + 1, 2^{2^n} + 1) \, | \, (2^{2^n}-1, 2^{2^n} +1) = 1$. Since we have an infinite sequence of numbers coprime in pairs, at least one prime number must divide each one of them and they are all distinct primes, thus giving an infinity of them. Proof 3 : (Note : I particularly like this one.) Define a topology on $\mathbb Z$ in the following way : a set $\mathscr N$ of integers is said to be open if for every $n \in \mathscr N$ there is an arithmetic progression $\mathscr A$ such that $n \in \mathscr A \subseteq \mathscr N$. This can easily be proven to define a topology on $\mathbb Z$. Note that under this topology arithmetic progressions are open and closed. Supposing there are finitely many primes, notice that this means that the set $$ \mathscr U \,\,\,\, \overset{def}{=} \,\,\, \bigcup_{p} \,\, p \mathbb Z $$ should be open and closed, but by the fundamental theorem of arithmetic, its complement in $\mathbb Z$ is the set $\{ -1, 1 \}$, which is not open, thus giving a contradiction. Proof 4 : Let $a,b$ be coprime integers and $c > 0$. There exists $x$ such that $(a+bx, c) = 1$. To see this, choose $x$ such that $a+bx \not\equiv 0 \, \mathrm{mod}$ $p_i$ for all primes $p_i$ dividing $c$. If $a \equiv 0 \, \mathrm{mod}$ $p_i$, since $a$ and $b$ are coprime, $b$ has an inverse mod $p_i$, call it $\overline{b}$. Choosing $x \equiv \overline{b} \, \mathrm{mod}$ $p_i$, you are done. If $a \not\equiv 0 \, \mathrm{mod}$ $p_i$, then choosing $x \equiv 0 \, \mathrm{mod}$ $p_i$ works fine. Find $x$ using the Chinese Remainder Theorem. Now assuming there are finitely many primes, let $c$ be the product of all of them. Our construction generates an integer coprime to $c$, giving a contradiction to the fundamental theorem of arithmetic. Proof 5 : Dirichlet's theorem on arithmetic progressions (just so that you not bring it up as an example...) Do you have any other nice proofs?
How to make so that page will have no number in latex? I mean for example if i dont want first page to have number "1" under
I am a newbie in Latex. I know there are many manuals where I can learn how to use Latex but I am facing a problem I can't manage to solve simply. The structure of my document is this: title page abstract table of contents The problem is that I don't want that the abstract page to have the page number at the bottom. To do this in the title page I simply used the command \pagestyle{empty} . Now if I try to do the same with the abstract page it doesn't work. Here it is the code of my document: \begin{document} \pagestyle{empty} \begin{figure}[t] \centering \includegraphics[scale=.40]{Sapienza.png} \vspace{3em} \end{figure} \begin{center} %%%% here there are many sentences \end{center} \clearpage{\pagestyle{empty}\cleardoublepage} \pagestyle{empty} %%in order to delete the number at the bottom of the page \chapter*{Abstract} %%sentences \pagestyle{plain}%%to insert again the number of the page \tableofcontents The problem is that the abstract page keeps showing the page number and I can't manage to delete it. Can you please help me?
I recently purchased a new, Silicon Power high-quality micro-SD card. I used it multiple times as a boot disk for my Raspberry Pi, each time I burned a 4gb disk image and installed the OS, then connected it to my computer and reformatted the SD card to a 64gb FAT32 filesystem with Windows' diskpart program. However, yesterday, after successfully burning the disk image, which was able to successfully boot the computer, I am unable to resize and reformat the disk. I tried using Diskpart, but i get data error (Cyclic Redundancy Check), and since a number of sites recommended chkdsk, I am unable to use chkdsk because I have a raw filesystem. This seems like a dead end, because people recommend chkdsk to fix a cyclic redundancy check, but I cannot use chkdsk because I am stuck with a RAW filesystem, which I am unable to format because of Cyclic Redundancy Check errors. There is absolutely no important data on my drive, and I do not have any problem reformatting and clearing all the data on the drive, so I am not looking for a data recovery solution, I am looking for a solution that will allow me to use my 64gb drive again. I am stuck, please help me recover my drive. Thank you very much! EDIT: I broke my Raspberry Pi, so I can no longer do any solutions that require the Raspberry Pi. However, I still have a Windows laptop running Windows 8.1.
I received a new HDD from my uncle, RAW file system. Tried CHKDSK, but it didn't work because of the RAW file system. Update I ran SpinRite 6 overnight and it got nowhere. Stayed at 0% for the whole 10 hours. SpinRite also gave me a notification that this drive is most probably toast. I think I am going to throw this drive away.
I am new to QGIS. I have multiple DEM raster files (.tif) added to my map. However, I am unable to alter any of the style options under the "Band Rendering" section. I have attempted to make changes and then save it as a new style, just clicking okay, just clicking apply, etc. Yet, every time, the original style choices are still there when I reopen the raster's properties. I am able to make changes to all other style options. I'm particularly interesting in changing the color gradient from "Black to white" to "White to black".
In a raster layer's Style Properties, I can choose pseudocolor render type, and choose a color ramp and classify the raster. However, when I click the 'Apply' button, or click 'OK', the visualization of the raster never changes. I was able to output a 'colorized' version of the same raster using GRASS plugin. I also reinstalled QGIS 2.8, and was able to adjust and see a raster stylings using the steps I outlined above. So, can anyone confirm this as an issue, or confirm that there's a mistake somewhere in my process? I should note that I'm on a Mac, 10.10.4, and I'm using the QGIS provided by , 2.10.1-1 . Update 1: Here's a screenshot of the rest of my settings. I have Grayscale set to off in the Style setting. Also, I don't believe grayscale/color-blind Preview is available on the Mac version of QGIS. They're does't appear to be the option where it , in the Menu Bar under View / Preview / Photocopy (grayscale) etc. Either way-- I added a shapefile to show color. Update 2: I've experimented with setting color interpolation to discrete, linear, and exact, but still am not able stylize using Singleband pseudocolor. I've also confirmed that the 'Render' box on the the main map view is checked. Also, I am able to adjust Color Rendering settings, like Hue, Blending Mode, etc., and see the results when clicking 'Apply' or 'OK'. Update 3: As other Mac users are confirming this, I think it may be a bug. I've created a bug report at the official .
Let $f:[0,\infty)\to\mathbb{R}$ be bounded on every interval $[0,b]$ for $b\gt0$. Assume that $$\lim_{x\rightarrow\infty}\left(f(x+1)-f(x)\right)=0.$$ How do I prove that $$\lim_{x\rightarrow\infty} \frac{f(x)}{x}=0?$$
Let $f:[0,+\infty)\to\Bbb R$ be a function bounded on each finite interval. I want to show that if $\lim\limits_{x\to+\infty}[f(x+1)-f(x)]= L,$ then also $\lim\limits_{x\to+\infty}\dfrac{f(x)}x = L$
Why does Quantum Field Theory use usually Lagrangians rather than Hamiltonains? I heard many reasons, but I'm not sure which is true. Some say it's just a matter of beauty, so Lagrangians are more beautiful because they don't break/separate the space-time variables (so space-time is a single variable, like in the Klein-Gordon Lagrangian and Hamiltonian). Some say that Hamiltonians are not always Lorentz invariant. Could someone explain in a little bit more details?
Undergraduate classical mechanics introduces both Lagrangians and Hamiltonians, while undergrad quantum mechanics seems to only use the Hamiltonian. But particle physics, and more generally quantum field theory seem to only use the Lagrangian, e.g. you hear about the Klein-Gordon Lagrangian, Dirac Lagrangian, Standard Model Lagrangian and so on. Why is there a mismatch here? Why does it seem like only Hamiltonians are used in undergraduate quantum mechanics, but only Lagrangians are used in quantum field theory?
i hava a php code inside a javasript for loop code the problem is the php code run once even though the loop go many times here is my code <script> function myFunction() { var j,i,k,x=[]; <?php $k=0; ?>; <?php $faculys= App\faculty::all(); $i=0; foreach($faculys as $faculty) { $array[]=$faculty->name; $i++; } ?>; i= <?php echo $i; ?>; for(j=0; j<i; j++) { x[j]='<?php echo $array[$k]; ?>'; <?php $k++; ?>; } k= <?php echo $k; ?>; </script> the result of $k and k is always one what is my error.
I want to use a PHP variable in JavaScript. How is it possible?
I am new to lubuntu. I have installed java8 in my laptop. i need to set up environment variable (sudo nano /etc/environmet) i have entered the JAVA_HOME =" path" but i dont know how to properly save and exit the window. Can you please help me with this ?
Sometimes, a graphical text editor like gedit or kate cannot be used (because you're in a virtual console for example). Luckily, there are text editors for the terminal. An easy one is nano, but I cannot understand how to work with it. If I start nano by running nano, the bottom text is supposed to help me but all I see are things like ^G Get Help ^O WriteOut. How can I open text files for editing? How can I save the file? How can I quit the editor without saving the changes? How to edit? I heard that you've to enter some commands to begin editing in vi, is this true for nano too? Sometimes, if I manage to open a file, the text is unreadable due to its colors. How can I disable these colors? (see the image below) In the some files, lines are truncated because those do not fit in the screen. How can I prevent that from happening? (see the image below)
I am new to JAVA and just started learning IS-A and HAS-A relation but couldn't get much .I want to visualize how these two are different and when we should be using IS-A and HAS-A ?
Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?
Let $S=[0,1)\cup [2,3]$ and let $f:S\to \mathbb{R}$ be strictly increasing such that $f(S)$ is an connected subset of $\mathbb R$. How to show that $f$ is continuous? $f(S)$ is connected means it is an interval. Also $f$ is one-one. But I couldn't proceed further. Please suggest!
Let $S = [0,1) \cup [2,3]$ and $f\colon S \rightarrow \mathbb R$ be such that $f(S)$ is connected . Which of the following are true: a) $f$ is discontinuous exactly at one point. b) $f$ is discontinuous exactly at two points. c) $f$ is discontinuous at infinite many points. d) $f$ is continous. I think $f$ is continuous . We need to show that $\lim_{x \to a^+}f(x) = f(a)$ for any $a \in S$. Since $f(x)$ is increasing, $\lim_{x \to a^+}f(x) \leq f(a)$. Suppose $\lim_{x \to a^+}f(x) < f(a)$. Then there is $l$ such that $\lim_{x \to a^+}f(x) < l <f(a)$, which contradicts connectedness of $f(S)$. Similarly we can show that $\lim_{x \to a^-}f(x) = f(a)$. I would be thankful if anyone would check my solution and correct me if there are any errors.
Imagine two objects of mass $m$ each (both of them in outer space), with initial velocities $v_0$ and $0$. Now I apply a constant force $F$ on both of them for time $t$. Now the change in energies of the masses are $$\Delta E_1=m v_0\Delta v + \frac{1}{2}m\Delta v^2$$ $$\Delta E_2=\frac{1}{2}m\Delta v^2$$ What these equations are saying is that I lose more energy when I try to accelerate an already moving object (same amount of momentum transfer doesn't mean same amount of energy transfer). This doesn't make sense. If I look at it mathematically, i.e $dW = \vec{F} \cdot \vec{ds}$, I completely understand why I'll have to spend more energy on the moving object. But for some reason my intuition says if I apply same force on objects moving at different velocity for the same amount of time, I'll lose the same amount of calories. Where is my intuition wrong?
Consider a rocket in deep space with no external forces. Using the formula for linear kinetic energy $$\text{KE} = mv^2/2$$ we find that adding $100\ \text{m/s}$ while initially travelling at $1000\ \text{m/s}$ will add a great deal more energy to the ship than adding $100 \ \text{m/s}$ while initially at rest: $$(1100^2 - 1000^2) \frac{m}{2} \gg (100^2) \frac{m}{2}.$$ In both cases, the $\Delta v$ is the same, and is dependent on the mass of fuel used, hence the same mass and number of molecules is used in the combustion process to obtain this $\Delta v$. So I'd wager the same quantity of chemical energy is converted to kinetic energy, yet I'm left with this seemingly unexplained $200,000\ \text{J/kg}$ more energy, and I'm clueless as to where it could have come from.
Blender 2.79 Two objects with identical material settings and no texture. Viewed in Object Mode/Solid View the one on the left has a dark, bluish tint. The two look identical in other views and render with identical colors. But why the different colors in Solid View? A minor but nagging and annoying nuisance. Much thanks from a newbie.
While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered. The blackening effect is visible in the viewport too. How can I solve this problem?
I can't get the AWS CLI using python2.7 to work after upgrading to Ubuntu 16.04LTS. I've tried the suggestions from with no luck. I also uninstalled and reinstalled python2.7. The error I get is ImportError: No module named datetime
OS: Ubuntu 14.04 LTS Python: 2.7.6 My installation of Gourmet Recipe Manager suddenly stopped loading. When I run it in a terminal window, I get the following at the end of the traceback: import datetime as dt ImportError: No module named datetime So far as I can tell, nothing has been changed and my Python installation is up to date. It simply quit working yesterday. I'd certainly appreciate a good approach to diagnose and fix this problem! Update: thanks to all who replied! Tim, I'm sorry if I asked this question in the wrong place. Please chalk it up to being a new guy simply following the links from the Ubuntu website. TheSchwa, I tried your suggestion and got the same error message as above. muru, the package seems to be installed, but I have no idea if it's installed/configured correctly. How might I find out? I'm sorry for all the questions, but I'm an old RedHat guy who has been away from Linux for some time. All of the apt/dpkg stuff is new to me.
$mx''+25x = 12 cos(36πt)$ my take on this: ${\omega_0} = \sqrt{k \over m} = \sqrt{25 \over m}$ $x_h = c_1cos({\omega_0}t) + c_2sin({\omega_0}t)$ $x_h = c_1cos(\sqrt{25 \over m} t) + c_2sin(\sqrt{25 \over m}t)$ $x_p = {{12 \over {m({\omega_0^2 - \omega^2})}}cos(36\pi t)} = {{12 \over {25-1296m^2}}cos(36\pi t)}$ but I am stuck here. am I on the wrong road?
Problem: $$y''+20y=100\sin(wt)$$ conditions: $$y(0)=2, y'(0)=0$$ What would the solution for $y(t)$ be when $w=2\sqrt 5$ So far I have GS(H)=Acos($\sqrt 20$)+Bsin($\sqrt 20$).
I know the original movies, as well as I think the Clone Wars and Rebels cartoons were brought forward. I know Disney's movies are canon, and I assume the books being released after Disney purchase are canon as well. But are all things put out after Disney purchase canon? Like story mode of Battlefront 2? Curious what gets labeled as canon and what does not, and is there a distinction to know the difference?
For all types of derivative works, namely: Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous ) According to what rules does something become "canon" and who is responsible for the evaluation of a published work?
UPDATE: It's a padding: every such non-rwx area is preceded with a readable and/or writable area and together they constitute a 64Mb segment (for 64bit architecture). A relevant question on SO: I have discovered there are plenty of VM segments that don't have any of rwx flags, just p: 7f7e98033000-7f7e9c000000 ---p 00000000 00:00 0 Size: 65332 kB Rss: 0 kB Pss: 0 kB Shared_Clean: 0 kB Shared_Dirty: 0 kB Private_Clean: 0 kB Private_Dirty: 0 kB Referenced: 0 kB Anonymous: 0 kB AnonHugePages: 0 kB Swap: 0 kB KernelPageSize: 4 kB MMUPageSize: 4 kB Any reference on what it means? Unlike what's described in , it's not a mapping from a shared library since it does not have a corresponding fd attached. It's a custom long running C++ daemon, but I found some other processes have similar usage patterns: eg erlang (which also has plenty of them). In contrast long running php-fpm and python processes have literally 0 of such segments. "What other mappings does it have?" --- everything else is kind of expected and usual: just normal r/w private segments and shared libraries.
Why does /proc/pid/maps contain a few records for the same library ? Here is an example: 7fae7db9f000-7fae7dc8f000 r-xp 00000000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 7fae7dc8f000-7fae7de8f000 ---p 000f0000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 7fae7de8f000-7fae7de97000 r--p 000f0000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 7fae7de97000-7fae7de99000 rw-p 000f8000 08:05 536861 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.20 What does this mean ?
Is there a way to make underscored/underlined text? I read editing help and there seem to be nothing about that. By underscored I mean what in HTML is done with <u>...</u>: Alice wanted to <u>emphasize</u> that her dress is fabulous. "Layman's logic" would suggest using actual underscore _ to create such feat but it make things italicized. So question remains - is there a way to underscore a text?
Why is it that italic and bold formatting is available while underline is not? I guess it is voluntary, I'm just wondering why that would be the case.
I don't use linux very often, but I need to for this particular python project. Because of that, I'm trying to make an installer for my program using this shell script: SETUP.sh #!/bin/bash apt-get update apt-get install python3-pip -y apt-get install python3-tk -y pip3 install -r requirements.txt after chmodding it to be executable, and running sudo sh SETUP.sh I get this output: : notfound: SETUP.sh: E: Invalid operation update ] is not known. option ' ] is not known. option ' SETUP.sh: 6: SETUP.sh: pip3: not found The weirdest part is all those commands work on their own if I just manually put them into the command line. What am I doing wrong?
Trying to get casperjs running on Ubuntu 12.04. After installing it when I run I get: 09:20 $ ll /usr/local/bin/casperjs lrwxrwxrwx 1 root root 26 Nov 6 16:49 /usr/local/bin/casperjs -> /opt/casperjs/bin/casperjs 09:20 $ /usr/bin/env python --version Python 2.7.3 09:20 $ cat /opt/casperjs/bin/casperjs | head -4 #!/usr/bin/env python import os import sys 09:20 $ casperjs : No such file or directory 09: 22 $ python Python 2.7.3 (default, Sep 26 2013, 20:03:06) [GCC 4.6.3] on linux2 So Python is present and runnable, casperjs is pointing to the right place and it is a python script. But when I run it I get "No such file". I can fix it by changing the first line of the casperjs python file from: #!/usr/bin/env python to: #!/usr/bin/python Result: $ casperjs --version 1.1.0-DEV I managed to fix it, but I'm wondering why it didn't work with #!/usr/bin/env python, since that seems to be a normal interpreter line. Do I have something configured wrong? Here are the steps to get casperjs: $ git clone git://github.com/n1k0/casperjs.git $ cd casperjs $ ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs $ casperjs : No such file or directory
For all the days between 2003-04-01 and 2003-04-07 find the number of trips from town Rostov. Result set: date, number of trips. Here is the database schema: query and result set: SELECT MyDates.d as Dt, count(distinct trip.trip_no) as Qty FROM trip JOIN pass_in_trip ON trip.trip_no = pass_in_trip.trip_no FULL OUTER JOIN (select cast(cast(x.yr as varchar)+'-'+cast(y.mo as varchar)+'-'+cast(z.dy as varchar) as datetime) d from (select 2003 yr) x CROSS JOIN (SELECT 4 mo) y CROSS JOIN (select 1 dy UNION ALL select 2 UNION ALL select 3 UNION ALL select 4 UNION ALL select 5 UNION ALL select 6 UNION ALL select 7) z where dy<=7) MyDates ON Mydates.d = pass_in_trip.date WHERE trip.town_from = 'Rostov' GROUP BY MyDates.d, pass_in_trip.date, trip.trip_no +-------------------------+-----+ | Dt | Qty | +-------------------------+-----+ | NULL | 1 | | NULL | 1 | | NULL | 1 | | NULL | 1 | | 2003-04-01 00:00:00.000 | 1 | | 2003-04-05 00:00:00.000 | 1 | +-------------------------+-----+ Here is the result set I want +-------------------------+-----+ | Dt | Qty | +-------------------------+-----+ | 2003-04-01 00:00:00.000 | 1 | | 2003-04-02 00:00:00.000 | 0 | | 2003-04-03 00:00:00.000 | 0 | | 2003-04-04 00:00:00.000 | 0 | | 2003-04-05 00:00:00.000 | 1 | | 2003-04-06 00:00:00.000 | 0 | | 2003-04-07 00:00:00.000 | 0 | +-------------------------+-----+ FYI - I think this is using MySQL or sql server, it's a bit unclear to me.
I'm building a quick csv from a mysql table with a query like: select DATE(date),count(date) from table group by DATE(date) order by date asc; and just dumping them to a file in perl over a: while(my($date,$sum) = $sth->fetchrow) { print CSV "$date,$sum\n" } There are date gaps in the data, though: | 2008-08-05 | 4 | | 2008-08-07 | 23 | I would like to pad the data to fill in the missing days with zero-count entries to end up with: | 2008-08-05 | 4 | | 2008-08-06 | 0 | | 2008-08-07 | 23 | I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side. Any genius ideas/slaps in the face for why me am being so dumb? I ended up going with a stored procedure which generated a temp table for the date range in question for a couple of reasons: I know the date range I'll be looking for every time The server in question unfortunately was not one that I can install perl modules on atm, and the state of it was decrepit enough that it didn't have anything remotely Date::-y installed The perl Date/DateTime-iterating answers were also very good, I wish I could select multiple answers!
In the book which I'm reading now, the author says, in an arbitrary Unique Factorization Domain $R$, $(a_0, a_1, ..., a_d) = (1)$ and $\gcd(a_0, a_1, ..., a_d) = 1$, where each $a_i \in R $, is not necessarily equivalent. I know the first one implies the seconed one, but in my native thought, the second one is seemed to imply the first one. To disprove this, I'd like to see some example that in some UFD $R$, $(a_0, a_1, ..., a_d) \neq (1)$ but $\gcd(a_0, a_1, ..., a_d) = 1$. But I can't come up with such domain $ R$. Could you give me such example? Thank you for kind answer in advance.
We know that if $A$ is a PID, then we can guarantee the existence of a $\gcd$ between two elements. My question is, does the converse hold? If I know that every two elements have a $\gcd$, do I know that the ring is a PID? My intuition says no, in that case I would like a counter-example. Thanks.
So today I asked if there's something like Protected member class in Python where many people said there's no something like lik Public Protected or Private . But I made the following code to test this: class Vehiculo(): def __init__(self, peso): self.__peso = peso and from an outer class I did: car = Vehiculo(10) car.__peso = 20 and what it printed was still 10, so this is like Private, however when I changed the class variable with just one underline: class Vehiculo(): def __init__(self, peso): self._peso = peso it printed 20 instead. Can someone clearly explain this to me? I've read a very similar post (that many consider as duplicate) but I DON'T UNDERSTAND what they say. This is exactly the Public Private behavior. And I'd like to know how to do a Protected behavior or if it's even possible. Thanks and regads.
Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like this: __myPrivateMethod(). How, then, can one explain this >>> class MyClass: ... def myPublicMethod(self): ... print 'public method' ... def __myPrivateMethod(self): ... print 'this is private!!' ... >>> obj = MyClass() >>> obj.myPublicMethod() public method >>> obj.__myPrivateMethod() Traceback (most recent call last): File "", line 1, in AttributeError: MyClass instance has no attribute '__myPrivateMethod' >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] >>> obj._MyClass__myPrivateMethod() this is private!! What's the deal?! I'll explain this a little for those who didn't quite get that. >>> class MyClass: ... def myPublicMethod(self): ... print 'public method' ... def __myPrivateMethod(self): ... print 'this is private!!' ... >>> obj = MyClass() What I did there is create a class with a public method and a private method and instantiate it. Next, I call its public method. >>> obj.myPublicMethod() public method Next, I try and call its private method. >>> obj.__myPrivateMethod() Traceback (most recent call last): File "", line 1, in AttributeError: MyClass instance has no attribute '__myPrivateMethod' Everything looks good here; we're unable to call it. It is, in fact, 'private'. Well, actually it isn't. Running dir() on the object reveals a new magical method that python creates magically for all of your 'private' methods. >>> dir(obj) ['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod'] This new method's name is always an underscore, followed by the class name, followed by the method name. >>> obj._MyClass__myPrivateMethod() this is private!! So much for encapsulation, eh? In any case, I'd always heard Python doesn't support encapsulation, so why even try? What gives?
Do there exist any 3-regular graphs with an odd number of vertices? I'm starting a delve into graph theory and can prove the existence of a 3-regular graph for any even number of vertices 4 or greater, but can't find any odd ones.
I'm having a bit of a trouble with the below question Given $G$ is an undirected graph, the degree of a vertex $v$, denoted by $\mathrm{deg}(v)$, in graph $G$ is the number of neighbors of $v$. Prove that the number of vertices of odd degree in any graph $G$ is even.
I am wondering how to prove that the supremum of the following sequence is 1 $$a_n=\sin (n)$$
how to prove $\sup \{ \sin n \mid n\in \mathbb N \} =1$
Are the "If you be my everything..." and "If I be wrong" structures correct? Thank you for the answers!
Possible Duplicate: 2 examples first: 1.It is announced that the accounting class of the 3rd and 4th hours on the morning of this Wednesday be cancelled 2.It is expected that everybody and each household be on guard Someone told me this kind of examples above appears in the textbook as strict sentences to be taught in the classroom, so is that right for the usage of be Meantime I looked up the word be at thefreedictionary.com and found one piece of interpretation says : Archaic Used with the past participle of certain intransitive verbs to form the perfect tense: "Where be those roses gone which sweetened so our eyes?" (Philip Sidney). So is there any connection between the archaic usage & the examples above? BTW, how to understand the short phrase "the 3rd and 4th hours". Many thanks!
I know that the reason why 0.999 recurring equals to one because it's goes on forever, and the difference between 0.999 recurring and 1 is 0 since it's infinite. But is it possibly to prove otherwise? I read online articles about surreal numbers and hyper real numbers, but does it help in proving 0.99 recurring bit equal to 1?
I've just happened to read this on MO (that of course has been closed) and some of the answers to a similar on MSE. I know almost nothing of nonstandard analysis and was asking myself if something like the sentence « $1- 0.999 \dots$ is a nonzero positive infinitesimal» could be easily expressed and proved in nonstandard analysis. First of all, what is 0.999... ? If we take the usual definition as a series or as a limit of a sequence of rationals, then it will still be a real number and equal to $1$ (I guess by "transfer principle", but please correct me if I'm wrong). Instead, let's define $$0.9_N:=\sum_{i=1}^N 9\cdot 10^{-i} $$ where $N\in{}^*\mathbb{N}\setminus\mathbb{N}$ is an infinite nonstandard natural number. This $0.9_N$ is a legitimate element of ${}^*\mathbb{R}$, expressed as $0.$ followed by an infinite number of "$9$" digits. What can be said about $\epsilon_N:=1-0.9_N$ ? Is there an elementary proof that $\epsilon_N$ is a positive infinitesimal of ${}^*\mathbb{R}$ ? (by "elementary" I mean just order and field axioms and the intuitive facts about infinitesimals, like that for $x$ infinite $1/x$ is infinitesimal etc.; no nonprincipal ultrafilters & C).
One of my students refuses to split infinitives. His solution is to put the adverb directly before the infinitive, without fail, five times in two pages of writing. Telling him to split the infinitive will go nowhere. Examples: I need carefully to consider. . . I need intentionally to direct . . . Another post discussed the meaning change between "I decided to go quickly" and "I quickly decided to go." In the student's examples, it is doubtful that clarity is at stake, but the order still feels unnatural to me. I've told him before that the adverb appears roughly connected to the main verb. What else can I say? This student knows grammar well and turns in otherwise immaculate work. Or do his sentences sound natural to you?
Mark's generosity in this crisis seems to more than make up for his earlier stinginess. Should those sentences always be avoided, or are there cases where they are valid?
I found an old brew mp flip phone and want to install android on it. There are multiple guides on how to install an os onto an android phone but I haven't seen anything on brew mp.
Many people want to try/use Android without buying a new Android phone. How can I install Android on my current phone or device running Nokia Symbian, Maemo, or MeeGo; Microsoft Windows Mobile or Windows Phone 7/8/10; Apple iOS (iPhone); RIM's BlackBerry OS; Palm's WebOS; Samsung's Bada; HP's WebOS; Mozilla's Firefox OS; or other phone / operating system?
If I type the following command in Bash: echo "dog!!" I don't get the string dog!!. Instead I get something else. I tried to echo the string "dog!!" by echoing "dog\!\!, but it doesn’t work either. How can I use command arguments when there are two exclamation marks? I want these exclamation marks to be treated as exclamation marks without any special function. Two exclamation marks "!!" seem to be the last command.
Today, I was caught redhanded while attempting to code golf a password generator for Twitter. import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9)) 90 chars. Since that is a lot of spare space, I decided to raise the bar and make it executable too. echo -e "#!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg 139 chars. Nice, except obviously bash chokes on the exclamation point. badp@delta:~$ echo -e "#!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg bash: !/usr/bin/python\nimport: event not found Pesky exclamation point. "Let's escape it," I thought! I do have one spare character after all. echo -e "#\!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg Obviously... badp@delta:~$ echo -e "#\!/usr/bin/python\nimport string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))">pg;chmod +x pg;./pg ./pg: line 2: syntax error near unexpected token `(' ./pg: line 2: `import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9))' badp@delta:~$ cat pg #\!/usr/bin/python import string as s,random;print ''.join(random.sample(s.letters+s.digits+s.punctuation,9)) Leaving my asinine code golfing aside -- I can't explain this. With \!, the exclamation point was escaped, except it really wasn't, because the \! was left as-is for echo to pick up. One solution could have been using \x21 instead, but I'm not convinced that's the proper way of escaping an exclamation point in a bash command. tl;dr: How do you properly escape an exclamation point in a bash command?
public class Main { public static void main(String[] args) { generateRandomNumber(); } public static void generateRandomNumber(){ double[] insideArray = new double[5]; for(int i=0; i<insideArray.length; i++) { double value = (Math.random()+1)*10; insideArray[i] = value; String.format("%.2f", insideArray[i]); } System.out.println("Displaying random generated Array: " + Arrays.toString(insideArray)); } } I am trying to generate 5 random numbers and store to an Array. And I would like to format decimals up to 2 numbers. I tried "String.format()" method but didn't work. Still I am getting double like: 10.xxxxxxxxxxx. How can I format it such as ex: 10.xx ?
What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations. I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes. I know one method of doing this is to use the String.format method: String.format("%.5g%n", 0.912385); returns: 0.91239 which is great, however it always displays numbers with 5 decimal places even if they are not significant: String.format("%.5g%n", 0.912300); returns: 0.91230 Another method is to use the DecimalFormatter: DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385); returns: 0.91238 However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this: 0.912385 -> 0.91239 0.912300 -> 0.9123 What is the best way to achieve this in Java?
I have a file that contains phone numbers of the following formats: (xxx) xxx.xxxx (xxx).xxx.xxxx (xxx) xxx-xxxx (xxx)-xxx-xxxx xxx.xxx.xxxx xxx-xxx-xxxx xxx xxx-xxxx xxx xxx.xxxx I must parse the file for phone numbers of those and ONLY those formats, and output them to a separate file. I'm using perl, and so far I have what I think is a valid regex for two of these numbers my $phone_regex = qr/^(\d{3}\-)?(\(\d{3}\))?\d{3}\-\d{4}$/; But I'm not sure if this is correct, or how to do the rest all in one regex. Thank you!
I'm trying to put together a comprehensive regex to validate phone numbers. Ideally it would handle international formats, but it must handle US formats, including the following: 1-234-567-8901 1-234-567-8901 x1234 1-234-567-8901 ext1234 1 (234) 567-8901 1.234.567.8901 1/234/567/8901 12345678901 I'll answer with my current attempt, but I'm hoping somebody has something better and/or more elegant.
I am trying to implement the craps game in C++, rules are given below. So I created a function which will generate two numbers for me, sometime this function needs to be called twice, but when it is called for the second time its giving me the same random number it gave me the first time. I want to randomize the numbers I get in the the second call to rollDice() function. How do I do that? Example output 1: Player rolled 3 + 4 = 7 Player won! Example output 2: Player rolled 2 + 2 = 4 Point is 4 Player rolled 2 + 2 = 4 Player won! Example output 3: Player rolled 1 + 5 = 6 Point is 6 Player rolled 1 + 5 = 6 Player won! Game rules: Rule: A player throws two 6 face dice, if their sum is 7 or 11, they Win. if the sum is 2,3 or 12 they loose. if it's 4,5,6,8,9,10,12 it becomes a "point" and the player has to roll again. The player then keeps rolling until he hit the "point" again and he wins and loose if he hits a 7. Code: #include<iostream> #include<ctime> #include <cstdlib> using namespace std; //Generating two rand numbers from 1 to 6 int rollDice() { srand(time(0)); int face1 = 1 + rand()%6; int face2 = 1 + rand()%6; int sum = face1 + face2; cout << "Player rolled " << face1 << " + " << face2 << " = " << sum << endl; return sum; } string gameStatus; //Hold status of game; WIN, CONTINUE, LOST int sumOfDice = rollDice(); int point = 0; //This will hold sum of dice if it's default case defined below in Switch. int main() { switch(sumOfDice) { case 7: case 11: gameStatus = "WIN"; break; case 2: case 3: case 12: gameStatus = "LOST"; break; default: gameStatus = "CONTINUE"; point = sumOfDice; cout << "Point is " << point << endl; } while (gameStatus == "CONTINUE") { int rollAgain = rollDice(); if (rollAgain == point) gameStatus = "WIN"; else if (rollAgain == 7) gameStatus = "LOST"; } if (gameStatus == "WIN") cout << "Player won!"; if (gameStatus == "LOST") cout << "Player lost!"; }
I need a 'good' way to initialize the pseudo-random number generator in C++. I've found that states: In order to generate random-like numbers, srand is usually initialized to some distinctive value, like those related with the execution time. For example, the value returned by the function time (declared in header ctime) is different each second, which is distinctive enough for most randoming needs. Unixtime isn't distinctive enough for my application. What's a better way to initialize this? Bonus points if it's portable, but the code will primarily be running on Linux hosts. I was thinking of doing some pid/unixtime math to get an int, or possibly reading data from /dev/urandom. Thanks! EDIT Yes, I am actually starting my application multiple times a second and I've run into collisions.
If you sequentially subtract a number from row to row, sometimes excel will get close to, but not 0, even though 0 is the right answer? For example, if you start out with 1 and subtract 0.05 sequentially from the previous answer, you should eventually get to 0, but excel does not. Sometimes this poses a problem in doing financial calculations. Is there a setting that will convert these numbers to exact 0? I am reluctant to use round() in that it may adversely impact the other numbers that I would like to have the appropriate level of precision.
It's supposed to be zero but for some reason the result produces a peculiar series of digits at the end. Also, here's the .xlsx of it: http://83.212.111.36/Book1.xlsx
Is there a way to avoid this error java.lang.NullPointerException in array? I create an array with allocated size. But sometimes it doesn't fill up. And I get the error. How to avoid it? The code: public static produktas[] surasti (produktas G[], int n){ try{ int x = 0; BufferedReader in = new BufferedReader (new InputStreamReader (System.in)); produktas A[] = new produktas[5]; // size of array, but sometimes it may be 1 element, or two, or etc. for (int j=0; j<5; j++){ System.out.println("Kokio produkto ieskosime?"); String found = in.readLine(); for (int i=0; i<n; i++){ if (found.equals(G[i].gautiPav())){ A[x] = G[i]; x = x + 1; } } } return A; } catch(IOException ie){ ie.printStackTrace(); } return null; } And I'm asking about how to make dynamical array or smth, so it's not related to that topic.
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I am FAR from any sort of expert in any type of Linux development. I am looking to get an INEXPENSIVE and refurbished PC to run the latest release, but DO NOT want to cripple myself too much. It would be used mainly for browsing, word processing, audio listening, and video viewing. If there was some sort of Agent release I could run, I'd use it for that too. Can someone help this self-diagnosed hardware moron to understand what processor (Core Duo 2?), etc. would give me a DECENT (not "stellar")Linux experience? I'd appreciate any help VERY MUCH!!! :) Sorry for all the caps... having a bad day, and why should you suffer?
I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use? This is an attempt of a canonical answer. My answers have the "official requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.
I'm using Jupyter Notebook and python 3.8. Depending on other variables, I will generate a txt file with the command that must be entered (literally) on the command line. For example: topup --imain potato. This command is in the txt file as a line. I want to run this command as if in the cmd. I also want to do all of this from Jupyter Notebook and have some output to know what is going on. Is it possible? I also accept other ways to do this (I'm trying to automate an FSL procedure).
How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?
$$∫(2x+10)^{-1}dx$$ $$=\frac{1}{2}∫(x+5)^{-1}dx$$ $$=\frac{1}{2}\ln|x+5|+C$$ but here is the same integral, yet different answer $$∫(2x+10)^{-1}dx$$ Let $u = 2x+10\implies \frac{du}{dx} = 2 \implies dx = du/2$ $$\implies \frac{1}{2}∫u^{-1}du$$ $$=\frac{1}{2}\ln|u| + C$$ $$=\frac{1}{2}\ln|2x+10| + C$$ Yet, $\frac{1}{2}\ln|2x+10|$ does not equal $\frac{1}{2}\ln|x+5|$ Please let me know if I made any mistakes. I have been seeing this over and over in my DE class and it keeps bugging me
Question: Is it possible to get multiple correct results when evaluating an indefinite integral? If I use two different techniques to evaluate an integral, and I get two different answers, have I necessarily done something wrong? Often, an indefinite integral can be evaluated using different techniques. For example, an integrand might be simplified via partial fractions or other algebraic techniques before integration, or it might be amenable to a clever substitution. These techniques give different results. For example, looking over a few other questions on MSE: From : evaluate $$ \int x(x^2+2)^4\,\mathrm{d}x. $$ Via the substitution $u = x^2+2$, this becomes $$ \int x(x^2+2)^4\,\mathrm{d}x = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + \frac{32}{5} + C. $$ However, multiplying out the polynomial and integrating using the power rule gives $$ \int x(x^2+2)^4\,\mathrm{d}x = \frac{1}{10}x^{10} + x^8 + 4x^6 + 8x^4 + 8x^2 + C $$ From : evaluate $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x. $$ Simplifying the integrand using partial fractions then integrating gives $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x = \frac{-2}{(x+1)} - \ln|x+1| + C. $$ Via integration by parts, we get $$ \int \frac{1-x}{(x+1)^2} \,\mathrm{d}x = \frac{x-1}{(x+1)} - \ln|x+1| + C. $$ From : evaluate $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x. $$ Using the substitution $u = \sec(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x = \frac {\sec^2(\pi x)}{4\pi} + C. $$ Using the substitution $u = \tan(\pi x)$, this becomes $$ \int \frac {\tan(\pi x)\sec^2(\pi x)}2\,\mathrm{d}x = \frac {\tan^2(\pi x)}{4\pi} + C. $$
I have made a few attempts to begin writing with TEX or LATEX on a couple of MS Windows machines and one Ubuntu box I no longer own. ( I currently have Mint, though, and MS Windows, and I'm thinking of getting a Mac.) Those last few times, I was recommended to install a variety of programs, and they did not seem to work well with each other. Each time, after about a week of work, I would end up with a saved document that had one line on it that didn't look like what I wanted. To make a long question short(er), out of all the options, is there anything close to my hopes of finding the following: about half an hour to install not too many executables, and with which I can get to writing some equations within 24 hours? (Also, on a crappy old machine, what's the way to go?)
I am doing summer project in maths and I have to type my report. I am good with the latex I write on mathstack that I have learned through experience but when it comes to softwares, I do not know anything like those commands \begin \end does not make sense to me. Is there any software which can automatically put these commands in, so that in b/w we can type whatever stuff we want? Also if not, at least you guys can tell me if there is any latex software which shows the output on half of screen(right half), as I type on left half and compile, (I saw it somewhere). Anyways, I have to download a software and will have to go through some you tube videos, so please suggest me relatively easy Latex software. Thanks! P.S. Please edit the tags as you wish, I did not understand many tags here.
I think the equation above is false, but I cannot find a counterexample. Also, I think that the implication is true when $a_n^2 \to 1$ is also required. Suppose we have $a_n\in\mathbb{C}\ \forall n\in\mathbb{N}$. Can you help me?
Just thinking about it in terms of logic, shouldn't the series of a sequence whose limit as $n$ approaches infinity is 0 converge? I know that the $n$th term test for divergence says that if a series is convergent, then the limit of its sequence is 0 and I also know there are some sequences for which it has been "proven" that their series does not converge even though the sequence converges to 0, but I just don't believe these tests. If we stretch $n$ out to infinity and the terms are approaching 0, then how is it possible for the sum of the terms to "overflow" and diverge if the terms are becoming negligibly small?
In my assignment I have to prove that: Let $P(x)=x^4+a_{3}x^3+a_{2}x^2+a_{1}x+a_{0}$. Prove that if P has a root in $x_{0}$ and $P'(x_{0})\ne0$ then P has a least two roots. My solution has a problem in it, and I wondered if you can help me with it. Since the functoin is a polynomial then it is differentiable always. If we calculate the limit: $$\lim _{x\to \infty}P(x)=\lim_{x\to-\infty}P(x)=\infty$$ I tried to solve is by showing through Rolle's theorem by contradiction that the derivative is always $\ne0$ but no one told me that $a_{i}\ne0$ so I'm stuck. I know I should you IVT but I'm pretty much stuck. Your help is appriciated.
Let $$P(x) = x^4+a_3x^3+a_2x^2+a_1x+a_0$$ $$P(x_0) = 0$$ $$P'(x_0) \not= 0$$ with $x_0$ and each $a_i$ real. Prove that $P(x)$ has a at least two real roots. I can't figure why this is true.
Soldering in a RoHS-compliant way normally means using a solder that does not contain lead - the metal that made up most part of common solder before. Handsoldering using lead-free solder seems to be harder. Possibly it also makes industrial soldering methods "harder" (as opposed to just different)? What are the practical difficulties that arrise in comparison to using "classic" solder? What causes these difficulties? How can they be handeled or worked around?
I'm thinking of changing to lead-free solder. I've heard some people prefer a traditional Pb/Sn solder, but haven't heard any specific reasons why. I'm mostly doing through-hole work, and I have a decent temperature-controlled iron. So, are there any issues I might encounter with changing over? And are there any situations where I'd want to use a particular type?
Supposedly in order to complete the theory of everything needed to master gravity, the physicists needed some data that could only be obtained from a black hole. What was it that they needed?
In Interstellar, the team hopes that data collected from the inside of a black hole will solve “the gravity problem” (presumably the question of how to get a massive space station to escape the Earth’s atmosphere, explained in more detail ). Two related questions on this: How can “data” alone solve this scientific problem? Is it that they have too many possibilities to manually test, and their question is just “which is the right one?” Are there any real-world historical examples of good data leading to a breakthrough on achieving what was previously thought to be impossible? Why does the data have to come from a black hole? Isn’t this counter-intuitive, because a black hole is the one place where gravity doesn’t behave as it does on Earth, which is where the problem applies?
Compiling (C++): prod/coretech/hub/compression/lz4_compressor.os prod/coretech/hub/compression/lz4_compressor.cc:31:17: fatal error: lz4.h: No such file or directory #include "lz4.h" ^ compilation terminated. scons: *** [prod/coretech/hub/compression/lz4_compressor.os] Error 1 scons: building terminated because of errors.
Simple enough question: is there some shell command (or GUI method) I can use that, given the path to a file on my system, tells me what package put it there? Assuming the file did in fact come from a package, that is. Bonus question: what if it's a file that isn't installed on my system? Is there, say, a website that will let me look up a file and see what packages, if any, provide it?
Has anyone been able to evolve Eevee to more than one type of evolution? My first Eevee evolved to Vaporeon, so did my second. My friend now has 3 Jolteons. Is whatever evolves first the only evolution you can get?
So I just caught an Eevee. Now, I need 25 candies to evolve it. The fact is that in the GameBoy color versions, that Pokémon needed a stone to evolve instead of experience. Depending of the stone he was fed with (thunder, water or fire), he was evolving in a different Pokémon. Is the stone feature also in Pokémon Go? If not, what decide the evolution of this Pokémon? Bonus point : If it's possible, how can I get a stone?
I need to use some unicode glyphs relating to greek metric, namely ⎯ ⏑ ⏒ ⏓ ⏔ ⏕ ⏖, but I can't make them display on the document. I've got \documentclass{beamer} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage{fontspec} \setmainfont{Symbola} \begin{document} \begin{frame} \begin{description} \item[test] ⎯⏔⎯⏔⎯⏔⎯⏔⎯⏔⎯ \item \end{description} \end{frame} \end{document} But on the pdf it's missing
i want to set the main font in my beamer as "Consolas" i do like this : \documentclass{beamer} \usepackage{fontspec} \usetheme{Warsaw} \begin{document} \setmainfont{Consolas} \begin{frame} we discuss the ambiguities of existing security definitions and then provide a general framework for defining AKE security when involve strong adversary capabilities \end{frame} \end{document} but after compile it , the font doesn't change, it is the same with that before the main font was set. what's the reason?
Black holes pull anything and everything that enters past the event horizon into the singularity. What if the current unknown output where all of this infinitely condensed matter goes to is the creation of new universes through 'Big Bang' events? What if that matter eventually once again expands outward after the compression caused by the black hole no longer has such a great effect on matter in the singularity, possibly caused by an eventual large span of distance? Could this be the beginnings of additional universes, i.e. new 'Big Bangs?' Could our universe be tied to a black hole (or multiple black holes) whose output from its originating universe is the matter we have around us in our own universe? How large would a black hole have to be in order to collect enough matter for additional universes that they feed to have enough mass to grow, particularly to our own universe's current and expanding size?
As discussed in , as far back as the 1960s it was suggested that the Schwarzschild metric can be smoothly joined to a de Sitter metric. For example the idea has been used by Lee Smolin in his ideas idea for black hole evolution. If the suggestion is true it means that matter falling into a black hole would emerge into a de Sitter spacetime arguably comparable to our own. So has the universe we live in started as a black hole of this type? Is it possible to prove that the big bang was a black hole of this type?
This edit was apparently done by a moderator user named and appears to be robot vandalism. I can T written ints 1 documentcomplete handler am What is it? comment says "this is easy to do on linux"
I recently received this rather amusing message while reviewing a user's first post: Congratulations! This was only a test, designed to make sure you were paying attention. This post has already been removed, but thanks for taking time to leave feedback for the author. What is the purpose of this test? How does the audit work? What happens if I fail? Why was the system expecting me to negatively review a good post, or positively review a bad post? A review is obviously an audit. Should I report it? Do review audits count toward the Reviewer badge? Do robo-reviewers dream of electric sheep?
I am trying to figure out how to send a user to another page I design after they have input the correct password. I don't know how to load the page with a JavaScript Command. How could i use the code below to open a new page titled insideVault.html? I have tried many google searches, but cant find any resources to help me out with this. // login code // <div class = "container"> <div class = "passwordEnter"> <div class = "text-center"> <form id="login" onsubmit="return passCheck()" method="get"> <p> Enter Password </p> <input type="password" name="password" id = "password"> <input type="submit"> </form> </div> </div> </div> <script src="script.js"></script> </div> <script> function passCheck(){ var input = document.getElementById("password").value == 'test'; console.log(input); if(!input){ alert('Password incorrect, please try again.'); return false; } return true; } I want the code to load a new page, but so far I have not been able to find any code that would allow me to do this.
How can I redirect the user from one page to another using jQuery or pure JavaScript?
I have an array: arr[0]="a" arr[1]="b" arr[2]="a" I want to remove only arr[0], and keep arr[1] and arr[2]. I was using: arr= arr.Where(w => w != arr[0]).ToArray(); Since arr[0] and arr[2] have the same value ("a"), the result I'm getting is only arr[1]. How can I return both arr[1] and arr[2], and only remove arr[0]?
I have an array of Foo objects. How do I remove the second element of the array? I need something similar to RemoveAt() but for a regular array.
I need to know when the user clicks on the button that triggers window.open if there is stable API/way to know beforehand if the user actively has a pop-up blocker? In some cases the user doesn't know/pay attention that they have pop-up blocker (that block the new window). I would like to inform them by some dialog/or something to authorize a new window by clicking on allow.
Occasionally, I've come across a webpage that tries to pop open a new window (for user input, or something important), but the popup blocker prevents this from happening. What methods can the calling window use to make sure the new window launched properly?
Is it better to keep a laptop or smartphone battery always at 100% or to let it discharging before recharging ?
10 years ago when I was doing hardware support it was best practice to fully drain a laptop battery prior to recharging in order to maximize its life. Is this still the case or can a battery now be recharged at any point without worrying about shortening the lifespan?
So I'm using the testfor command to find near players with a item with a custom name and a specific amount. The issues I'm having is how to search for more than 1 stack of items like 100 items total. Here is what I've got for the command so far testfor @p {Inventory:[{id:"minecraft:paper",tag:{display:{Name:"$1"}}}]} I just don't know how to put "count:100" in there
I am using the AmazingKit plugin on my Minecraft server to make inventory kits for players. In a command block I have the following command: /tellraw @p ["",{"text":"Iron","clickEvent":{"action":"run_command","value":"_____"}},{"text":" / "},{"text":"Gold","clickEvent":{"action":"run_command","value":"_____"}}] Which prints the following result: Iron / Gold. When a player clicks on Iron, what command should I write where the empty space is _____ in order to check if the player has at least (>=) 20 iron ingots in his inventory and if he/she does, remove 20 iron ingots and execute /kit Basic. If the player has less than 20 iron ingots in inventory, the command won't be executed. Instead, Insufficient amount of iron ingots will be printed out. Same applies when a player clicks on "Gold". I'm on 1.14 version
Humans migrated from Africa about 60000 years. And in these years humans physical features undergone significantly in terms of skin color, hair, eye color and facial features. So, with this we can say that given 10000 years of span we can see a significant noticeable new changes in physical features of humans? like some humans with new skin color (apart from today's white, black and brown), new color eye balls, big heads etc.?
Reading this of the stack exchange got me thinking. I believe human evolution is an ongoing process and will not stop. Are there any predictions/theories about the phenotypes and genotypes of humans in the future? and how they may differ in a few thousand years compared to present day? I remember watching a youtube video and in the video the user predicts that there will be two branches of human species; a short dwarf like species and a much taller species. I'm still skeptical about this claim. Is there any evidence to back it up? One could argue that modern medicine is preventing natural selection. How will this effect human evolution?
Let $p$ be a real polynomial of the real variable $x$ of the form $$p(x)=x^n+a_{n-1}x^{n-1}+...+a_1x-1$$Suppose that $p$ has no roots in the open unit disc and $p(-1)=0$.Then which is/are true? $1$.$p(1)=0$. $2$.$\displaystyle{\lim_{x\to \infty}}p(x)=\infty$ $3$.$p(2)>0$ $4$.$p(3)=0$ product of the roots of the polynomial is $-1$. and it is a monic polynomial.If it has a root whose modulus is greater than one then it must have a root whose modulus is less than one which gives a contradicton. So it has roots $1$ or $-1$. since one root is $-1$ and product of the roots is $-1$ then it has a root $-1$.So 1 is true and 4 is false.obviously 2 is true. I am not sure about 3. since p has no root outside $[-1,1]$ so it does not change sign in $[1,\infty)$.So $p(2)>0$ or $p(2)<0$.But then I can not proceed.can I get some help?
Consider the root of the polynomial $p(x) = x^n+a_{n-1}x^{n-1}+a_{n-2}x^{n-2}+\dots+a_1x -1$. Suppose that $p(x)$ has no roots in the open unit disc in a complex plane and $p(-1)=0$. Show that $p(1)= 0$.
In my node editor I have a small movie clip with a green screen. I keyframed it to get rid of the green screen and I am using a transparent background image. I have realized that most of the video formats don't support transparent backgrounds, so I am trying to just render it frame by frame. However, when I use a format that should support transparency, like png, the pictures just come out with a brown or black background. My goal is to overdrop the clip on another video I have. How do I export this clip with a transparent background? Thanks for any help!
I would like to render an animation as a series of .png images with transparent backgrounds for use in a video. Is this possible?
I work with a team, and we tried to build a an error correcting code. After going through some algorithm, we decided to start with the Reed-Muller code. The coding is not complex, and we have managed to decode using MLD (majority logic decoding). Then we had a new constraint that the code must be systematic (the original message must be visible in the coded message). I transformed the generator matrix of Reed-Muller into systematic form. I ran into difficulties when decoding. My question is: can you use majorty logic decoding for systematic Reed-Muller? If yes, then how? Second: is it worth going with the Reed-Muller algorithm for systematic codes or are there better systematic block codes (that are easy to decode).
Reed–Muller codes are a family of linear error-correcting codes used in communications. The code of $RM(2,3)$ could be generated with matrix: \begin{pmatrix} 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 0 & 1 & 0 & 1 & 0 \\ 1 & 1 & 0 & 0 & 1 & 1 & 0 & 0 \\ 1 & 1 & 1 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 0 & 0 & 1 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 \\ 1 & 1 & 0 & 0 & 0 & 0 & 0 & 0 \\ \end{pmatrix} In several sources I have read there is a way to build systematic Reed-Muller code which keeps recieved signal of length $n$ in first $n$ bits of output signal. But I couldn't find how to do it. Any ideas?
I am new on ubuntu and i use xubuntu 16.04 my graphic card is AMD and Radeon HD 8670A/8670M/8690M / R5 M330 how i can install this driver ?
I have an MSI Radeon HD 7850 card. MSI provide no Linux support, and the AMD driver gives me an Unsupported Hardware watermark that does not show up in screenshots. I uninstalled the proprietary driver and found that Unity 3D no longer works, and I really only picked Ubuntu because of the excellent shortcuts provided in the recent versions. Trying to locate the open source driver has been a pain for me. According to the documentation I have read it is pre-included in Ubuntu 12.04, yet there is no Unity 3D support. I tried using the newest drivers from AMD's website, but that also had the watermark. Does anyone know how I can get the open source driver? If not, does anyone know how to remove the watermark. I'm on the verge of going back to Windows.
For the $n=3$ and $n \geq 5$, $A_n$ is simple, and suppose for a contradiction $H\leq S_n$ has index 2 and $H\neq A_n$, then since $H\cap A_n \unlhd A_n$ and $A_n$ is simple, $H \cap A_n$ must be trivial. Since $H$ has order equal to that of $A_n$ and $|A_n|>3$, there must exist at least two non-identity elements in $H$. Let $h_1 \neq h_2 \in H$ be non-identity elements of $H$. Then $h_1$ and $h_2$ must be odd permutations, hence $h_1 h_2 \neq h_1^2$. But the product of two odd permutations is even, so $h_1h_2 \in A_n$, so $h_1h_2 \in H\cap A_n = 1$, so $h_1h_2=h_1^2=1$, which is a contradiction. Therefore $A_n$ is the only subgroup of $S_n$ with index 2 for $n=3$ and $n\geq 5$. Also note that $A_1$ and $A_2$ are trivial, so we only have to prove the case for $A_4$. But then I'm stuck.
How to prove that the only subgroup of the symmetric group $S_n$ of order $n!/2$ is $A_n$? Why isn't there other possibility? Thanks :)
Revising to the exam again... In a chapter dedicated to something else, in the answers to an exercise, there was such a sentence: Yesterday I met Susan at the grocer's. / I met Susan at the grocer's yesterday. Problem is, when I was doing this exercise, I wrote this sentence in this way: Yesterday, I met Susan at the greengrocer's. I'm very doubtful about this comma. I must confess: I don't know (or remember) any rule that would say if the comma here is necessary? acceptable? Incorrect? I must confess: When I was learning English in school, I consciously skipped learning all those comma rules and instead I was relying on my intuition, which, I think, was becoming better and better the more English texts I was reading and the more commas my teacher was crossing out or putting in my tests with her red pen. And now, my intuition strongly tells me that the natural order of words in English, in case of this sentence, is: I met Susan at the grocer's yesterday. So, if I put "yesterday" at the beginning of this sentence, I'm inverting the usual order of words, thus necessitating a comma. (In a manner similar to conditional sentences: The usual order is "blah1 if blah2", so if I'm inverting it, I must put a comma: "if blah2, (then) blah1" but not "if blah2 (then) blah1".) Is my intuition correct here? (I suppose it's not, since this would imply this book has another error, and while that's not impossible, I find it more likely that I'm wrong.) Which rule is appropriate here? EDIT: Since someone marked my question a dupe of a couple of other questions that deal with possessive forms of store names: To make it clear: My question has NOTHING to do with store names and possessives! It is all about the comma after "yesterday" - this "grocer's" part is just to provide a full sentence example of my concern.
Here, Cambridge doesn't use a comma. I am confused. Example in Cambridge Dictionary: Unfortunately we can't come this evening after all. On different pages i found some rules telling there needs to be a comma. Examples follow: We do usually put a comma after adverbs like 'unfortunately'. They are called 'sentence adverbs' because they modify the whole sentence and often give the opinion of the speaker/writer. A parenthetical phrase adding detail to the main clause. Initially placed parentheticals are normally set off by a comma. Cause I'm studying for my Level 2 graduation, i want going crazy reading here and there comma rules followed by looking in the Cambridge Dictionary without finding them there. HELP me out please !
I am trying to re design a plugin to run multiple iterations of data loaded from a file. I am using QT creator to develop the GUI. How would I design a load data input box so users can select a data file and then run the plugin. The plugin initially uses single coordinate inputs i wish to use multiple.
I am in the process of developing a plugin for QGIS using Python. Note that this is my first plugin, so the query could be quite basic... I have used to create the basic plugin, and (quite surprisingly found it easy) created the plugin files. I am stuck at a very basic concept. Previously, while using Python IDLE, using QtCore.QObject.connect(self.Input, QtCore.SIGNAL("clicked()"), self.OpenBrowse) to signal a click and writing a function OpenBrowse def OpenBrowse(self): self.Input_TB.setText(filename1) I was able to open the Windows File Browse window on click and set the File location to an adjoining text box. How do I do this while developing the plugin in the Python file that is created by Plugin Builder.? I am very confused about where should the code be written? Because if I place the 'clicked()' actions, etc. in the Python file generated from the UI file, it is not recognizing the variables as they are not global (obviously). I am using QGIS 2.4, on a Windows 32-bit system.
When inspecting a PCB earlier today it occurred to me that all traces you find on modern PCB's are confined to 45 degree increments with respect to the (typically square) board edges. What is the rationale for this? Is this a fabrication consideration or something electrically inspired?
I've always wondered this: every single modern PCB is routed at 45 degree angle increments. Why does the industry prefer this so much? Doesn't any-angle routing offer more flexibility? One plausible theory would be that the existing tools only support 45 degree increments and that there isn't much pressure to move away from this. But having just researched this topic on google, I stumbled across - which does away with the 45 degree increments, and according to their marketing materials it does a considerably better job than the 45-degree-limited competitors. What gives? What would it take for you personally to start routing arbitrary angles? Is it all about support in your favourite software, or are there more fundamental reasons? Example of non-45-degree routing: P.S. I also wondered the same about component placement, but it turns out that many pick & place machines are designed such that they can't place at arbitrary angles - which seems fair enough.
I really wish there were better ways to browse the questions on SO (and the like). The Unanswered -> My Tags page is close to what I often want, but not always, and it often still gives me many questions I don't care about. I'd like to be able to filter by (at least): Accepted/Unanswered/No Answers Tags to include, defaulting to letting the user select tags marked as interesting, but able to specify any tags Tags to exclude - starts with ignored tags, but again user selectable, this one's critical, and lacking from the current power-searches I imagine a new button at the top, or maybe replacing 'Unanswered' called 'Custom' or 'Filters' - what's currently in 'Unanswered' could go inside this page - which would allow you to browse by pre-defined filters and by custom made filters, and also let you select which filter would be your default - what you see when you first hit SO.com. The questions would be ordered like usual - in terms of last update - though I wouldn't be opposed to allowing other orderings, I don't see that as critical to this feature. This would address several other requests/questions, including , , and . I realize the provide a fair bit of this functionality, but non of the user friendly interface that I imagine. This would be a huge boon for the usefulness of SO and would help prevent questions going unanswered and disappearing too quickly for those interested in answering to notice. I believe the default view of the home page is crippling to the distributed knowledge of SO, and as the site grows it becomes imperative for power users to browse their own way.
I realize that this may be a big request, but... I think that instead of tabs on the recent question activity pages, or more likely as a new tab, adding a more advanced filtering option. For instance, being allowed to exclude tags, filter by accepted answers or not, and, most importantly, being able to combine multiple filters! E.g.: Filtering posts with tag Javascript without tags Jquery and AngularJS with no accepted answers and a score >= 0. I feel like this is a biggish change that, if implemented as a new tab, wouldn't be that hard to implement, but would be very useful.
Is there a keyboard shortcut for maximizing the current window on Lubuntu 16.04?
In lubuntu-rc.xml Lubuntu doesn't have a hotkey to maximize the current window.
Recently I am stubborn enough to simply delete stuff that was in my mac. When I open up terminal, this pops up: (a screenshot of terminal with the code: Login incorrect login:) I am not sure if I have accidentally deleted one of the supporting files for Terminal in my mac (this is just a guess)? I've tried changing the shells. Typing in my username or even the correct password but it won't work at ALL. If there is no solution is a way to delete and reinstall Terminal? Someone suggested I reinstall the OS. If that is the easiest solution, how do I do it? (sorry I am an IT noob)
I've been having this issue for a while where I come to open the Terminal and I'm met with this: Login incorrect login: _ I've already deleted the com.apple.terminal.plist to no avail. The really interesting thing is that sometimes it works, maybe 1 in 50 times. I literally have no idea what might be causing it and after searching the web for the better part of half a day it seems everyone else's issues are fixed when they delete the plist file. How do I sort this out? I've tried running different shells (bash and zsh), but I still get this log in screen. Also when I use Activity Monitor, I can see there is no shell running just the login.
I've spent hours trying to understand the following error. My Script CMD="sh -c 'echo \"a\"'" $CMD Error: "a"': 1: "a"': Syntax error: Unterminated quoted string of course when I do echo $CMD and paste the result, it works as expected... What is the cause of the error? Edit: I'm asking for an explanation not only a workaround. Therefore, I think the following link doesn't answer my question:
How should I write the command variable to get the expected behavior? #!/bin/bash function f ( ) { echo "$2" } command="f --option=\"One Two Three\" --another_option=\"Four Five Six\"" $command f --option="One Two Three" --another_option="Four Five Six" First calling is wrong, second - right $> ./test.sh Two --another_option=Four Five Six
I am trying to restart my network on my CentOS server on a Raspberry PI 3 with systemctl restart network However, I am getting this Job for network.service failed because the control process exited with error code. See "systemctl status network.service" and "journalctl -xe" for details. [root@rpiserver ~]# systemctl status network.service network.service - LSB: Bring up/down networking Loaded: loaded (/etc/rc.d/init.d/network; bad; vendor preset: disabled) Active: failed (Result: exit-code) since Sun 2017-07-02 21:08:50 UTC; 2min 46s ago Docs: man:systemd-sysv-generator(8) Process: 1002 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=6) Jul 02 21:08:50 rpiserver systemd[1]: Starting LSB: Bring up/down networking... Jul 02 21:08:50 rpiserver systemd[1]: network.service: control process exit...=6 Jul 02 21:08:50 rpiserver systemd[1]: Failed to start LSB: Bring up/down ne...g. Jul 02 21:08:50 rpiserver systemd[1]: Unit network.service entered failed state. Jul 02 21:08:50 rpiserver systemd[1]: network.service failed. Hint: Some lines were ellipsized, use -l to show in full. This is my ifcfg-eth0 DEVICE=eth0 BOOTPROTO=static ONBOOT=yes IPADDR=192.168.1.200 NETMASK=255.255.255.0 GATEWAY=192.168.1.1
I am experiencing an issue on Centos7 when attempting to start the network service. I receive the below error message. Failed to start LSB: Bring up/down networking The issue arised when I realised it wasn't taking my static IP address from the /etc/sysconfig/network-scripts/ifcfg-eth0 file (found below). DEVICE=eth0 BOOTPROTO=static IPADDR=192.168.0.16 NETMASK=255.255.255.0 HWADDR=B8:27:EB:C3:1E:EC NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet On reboot, the device would load with IP address of 192.168.0.7, clearly not that static IP address assigned, and not sure how it is getting information of a DHCP server (which I do have, my router) I attempted to disable the NetworkManager, as this might have been causing havoc with the network service by issuing the below command. systemctl stop NetworkManager and then enable network systemctl start network again the same error came up, I then killed the dhclient process, and attempted to start network service once more and again got the same error. Losing patience, since I did have connectivity to the internet at the time on the server through the DHCP IP, performed a "yum remove Network Manager" and tried a reboot, again to no avail. I'm not sure if that was a good idea or not, but hey it wasn't working anyway. I seem to have exhausted suggestions I could find on the internet. Wondering if anybody else has any idea what might be going on. edit: one more note, this is not a VM or related to Virtualisation in any way. This is simply a RaspberryPI 3 Many thanks. Edit: Log entries: Jan 01 00:00:06 <hostname> systemd[1]: Starting LSB: Bring up/down networking... Jan 01 00:00:06 <hostname> systemd[1]: network.service: control process exited, code=exited status=6 Jan 01 00:00:06 <hostname> systemd[1]: Failed to start LSB: Bring up/down networking Jan 01 00:00:06 <hostname> systemd[1]: Unit network.service entered failed state Jan 01 00:00:06 <hostname> systemd[1]: network.service failed
If the number of arrangements of the letters of the word "MISSISSIPPI" if all the S's and P's are separated is $K\cdot\dfrac{10!}{4!\cdot4!}$ then $K$ equals My attempt is as follows:- Assuming question is asking to separate all instances of S and all instances of P but S and P can be together First arrange $M,I,I,I,I$, they can be arranged in $\dfrac{5!}{4!}=5$ ways $5$ characters will give $6$ gaps, so choose any $4$ gaps out of $6$ and insert $S's$ over there $\implies \displaystyle{6\choose 4}$ Now we have $5\cdot\displaystyle{6\choose 4}$ arrangements containing $9$ characters and all $S's$ are separated. Now its time to push $P's$ $9$ characters will give $10$ gaps, so choose any $2$ gaps out of $10$ and insert $P's$ over there $\implies \displaystyle{10\choose 2}$ So total arrangements will be $5\displaystyle{6\choose 4}{10\choose 2}=5\cdot\dfrac{6!}{4!\cdot 2!}\cdot\dfrac{10!}{2!\cdot 8!}=\left(\dfrac{5\cdot 4!}{2!\cdot 2!\cdot 8\cdot7}\right)\dfrac{10!}{4!\cdot 4!}$ $$K=\dfrac{15}{28}$$, but actual answer is $K=1$ What mistake am I doing here?
If the all S,P are separated in the word MISSISSIPPI then the total possible arrangements are $k\frac {10!}{4!.4!} $ then value of k is? Now all S,P are separated so we can have slash method. Thus they can be placed alternatively in $6! $ ways and rest 5 can be placed in $5! $ ways. Thus we equate to get $$6!.5!=k\frac {10!}{4!.4!} $$ to get $k=13.7$ while $k=4/3$ .Where is my mistake Thanks
We live at elevation 7000 ft up. How long should I cook swiss steak for tender thin sliced beef? I have never used a slow cooker in this altitude.
I live at a high altitude and love to use my slow cooker, but I don't think the meals are coming out as expected when I follow the recipes. Do I need to adjust the recipes for high altitudes?
I'm developing an add-on, that sits in the graph editor. I've just upgraded to Blender 2.78 and saw that the panel is divided into different tabs (View, Modifiers, F-Curve, etc.). My add-on is placed in its own tab (mmvt). How can I change the currently open tab to be my tab (in code)?
How can I detect and/or change the active tab in the current editor via Python? Is this doable? I have been digging through bpy.context.region/screen and not yet found a way to list the active tab.
I have many tags in my visualforce page, and am attempting to translate it to a lightning component. My tags are necessary because I need Kendo templates wrapped in script tags. I got an error saying I can't have script tags in the component, so I moved all of my javascript to the Controller, and it says invalid character '<', which is referencing the '<' on . Am I not able to just throw all of my Javascript (there is a lot......) into the controller and have it function correctly? If not, how do you include tags in a lightning component? Where do you put them?
I am able to include a JS file as static resource in my lightning component. But when I add "<<'script'>>" tag in the JS file it gives an error. I want script tag as i need to use src attribute in the JS file and then call it through static resource in my lightning component JS Code
I am making a text based calculator that can do addition, subtraction, division, multiplication and powers. The code I have written so far seems to work, but when it reaches the section where it determines if the inputed text is a +, -, /, *, or a ^, it endlessly loops and doesn't recognize the input. double inputX; // Used for input 2 double inputY; // Used for input 1 double output; // Used for math purposes String inputS; // Used for string input String subt; // Store the - in a string subt = "-"; boolean corrInput = true; boolean repeat = true; while (repeat == true){ System.out.print("Please enter a number: "); inputX = TextIO.getlnDouble(); // Retrieves inputX System.out.println("x: " + inputX + "\n"); System.out.print("Please enter a number: "); inputY = TextIO.getlnDouble(); // Retrieves inputY System.out.println("y: " + inputY + "\n"); while (corrInput == true){ System.out.println("Choose an operation: +, -, *, /, ^."); inputS = TextIO.getlnString(); // Retrieves a strings input // Calculator logic if (inputS == subt){ output = inputX - inputY; // X minus Y System.out.println("Calculatorator says that " + inputX + " - " + inputY + " = " + output); } else if (inputS == "+"){ output = inputX - inputY; // X plus Y System.out.println("Calculatorator says that " + inputX + " + " + inputY + " = " + output); } else if (inputS == "*"){ output = inputX * inputY; // X multiplied by Y System.out.println("Calculatorator says that " + inputX + " * " + inputY + " = " + output); } else if (inputS == "/"){ output = inputX / inputY; // X divided by Y System.out.println("Calculatorator says that " + inputX + " / " + inputY + " = " + output); } else if (inputS == "^"){ output = Math.pow(inputX, inputY); // X to the power of Y System.out.println("Calculatorator says that " + inputX + " ^ " + inputY + " = " + output); } else { System.out.println("Please provide a valid input. '" + inputS + "' is not valid input"); } } System.out.println("Want to do another Calculatoration?"); repeat = TextIO.getBoolean(); // Retrieves input as a boolean } System.out.println("Thank you for using my calculator!"); The solution is most likely obvious, but I am not
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
When browsing the homepage, I often come across new answers that don't qualify as answers (e.g. they are actually other questions, or just a comment). I then, of course, flag them. But in the case where there are already comments such as "This does not provide an answer [blablabla] - From review", it is obvious that some other user previously flagged it, and that it is already in the review queue. So, in this case, should I still flag these posts as "not an answer"? Does it serve some useful purpose, like voting for these posts to be deleted (assume I have access to the low-quality review queue), or does it just somewhat add noise to the system?
Let's say I see an answer that should not have been one and I flag it as Not An Answer (NAA). On this site I have plenty of reputation and am able to use the Low Quality (LQ) review queue and cast delete recommendation votes. Of course raising such a flag on a still virgin post brings it to the LQ review queue, but what happens if I flag a post on the main site that is already in the respective review queue? Is my flag simply useless in that case? I doubt it would be the same as casting a delete (recommendation) vote from the queue. And when I somehow manage to find that specific post in the review queue later, it's locked down for me, because I have already cast a flag. So was that flag without any effect? Based on how I currently guess the system works, I proposed two alternative solutions to improve the system in my feature request . They were first part of this question, but I decided to split the question from the feature requests.
Solve the recurrence relation $$f(n) = 2f(n - 1) + f(n - 2)$$ with initial conditions $f(0) = a, f(1) = b$. (here a and b are fixed, arbitrary integers). I'm confused on how to approach this, a and b are fixed, arbitrary integers.
Solve the recurrence relation $$f(n) = 2f(n - 1) + f(n - 2)$$ with initial conditions $f(0) = a, f(1) = b$. (here a and b are fixed, arbitrary integers). Can anyone show me how to solve this? a and b are fixed, arbitrary integers. Does it mean I can put any value for a and b?
I often use the on Stack Overflow. However, the "Edited [time] ago" box below doesn't appear until after the page is refreshed. This is different than the behavior if I use the edit link; doing this will show "edited [time] ago" immediately. Is this or a ?
Today I tried editing the tags using "edit tag" option for 10K users. Update a tag - > SAVED It didn't showed my name. After a refresh, it showed my name. Below are the screenshots for clear explanation. Is this the exact behavior?
i have a class in which there is a method wich returns http client like below. private HttpClient client; private HttpClient GetClient() { if (this.client == null) { this.client = new HttpClient { BaseAddress = new Uri("api") }; this.client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); } return this.client; } i am using this GetClient method in other methods like using (var client = this.GetClient()) { var response = await client.GetAsync($"/abc").ConfigureAwait(false); if (response.IsSuccessStatusCode) { result = await response.Content.ReadAsStringAsync().ConfigureAwait(false); } } this client is not getting null outside the using block.next time when this method hits then client is not null.whats the problem?
I am fascinated by the way the CLR and GC works (I'm working on expanding my knowledge on this by reading CLR via C#, Jon Skeet's books/posts, and more). Anyway, what is the difference between saying: MyClass myclass = new MyClass(); myclass = null; Or, by making MyClass implement IDisposable and a destructor and calling Dispose()? Also, if I have a code block with a using statement (eg below), if I step through the code and exit the using block, is the object disposed of then or when a garbage collection occurs? What would happen if I call Dispose() in the using block anyay? using (MyDisposableObj mydispobj = new MyDisposableObj()) { } Stream classes (eg BinaryWriter) have a Finalize method? Why would I want to use that?
Can anyone clarify the process when a phone is wiped? Let's assume that my phone gets stolen, and the thief being unable to unlock it chooses to wipe the device via a system restore in iTunes. Since the phone is (was) logged into my iCloud account, the thief will be unable to activate it, which should make it worthless to sell, right? So, assuming a stolen phone gets restored, during subsequent setup it requires a WIFI connection prior to then logging in to the iCloud account it is locked to, so it should be contactable. At this point, will the phone be still trackable by my icloud account using find my iphone service after being restored, even though it is not technically logged into any iCloud account? Will the custom message still be displayed to whoever has the phone?
If I lose my iPhone, and I use remote wipe to prevent my confidential data from being stolen, then can I still use Find My iPhone to locate it on a map? I'm assuming not (since it resets to factory settings), but I wanted to double-check.
teaches how to disable the CapsLock key. I have written a script which applies the command setxkbmap -option caps:none as part of an autostart procedure. It works fine, as long as I don't close the lid of my computer thus sending it to the suspend/sleep state (hibernation does not work with it). Now I have found out that the setxkbmap -option caps:none is not restored after waking my computer up. I want to add such a command to a script which is automatically invoked when the computer wakes up again. Is this possible? How and where do I have put this command?
Is there a way to run a script when a computer "wakes up" (from sleeping)? I know it can be done on startup, obviously, but the issue in this case is that the backlight of my laptop seems to reset every time it wakes up from sleep, and I'd ideally like to have a script take care of turning it down to a reasonable level instead of having to type it in manually every time.
I’m a Sprint customer and I changed my network to T-Mobile at the T-Mobile store. Since then my voicemail is not available. I setup my voicemail at the store and when I try to retrieve my voicemail it asks me to set a password and greeting?
The voicemail on my iPhone used to work well, so basically if I click the voicemail button on the interface of Phoneapp, I would get a list of voicemail that I can choose from and listen to. But recently, I found that whenever I click the voicemail button, I was transferred to a call as shown below and it looks pretty much like a virus to me. Click the voicemail button on the lower right corner, You will be automatically transferred to a call, Is this a virus or some mis-configuration of my iPhone?
I want to block search engines from crawling my websites. Atleast for Msn, Yahoo, Google, and Yandex. i dont really trust robot.txt. Because they can simply ignore it and continue crawling. I would use rails as my web framework. How can i do it, atleast to decrease the posibility destructive action they do by simply crawling a specific page. Is there any special mark or identifier on them while they are crawling a site ? This question marked as duplicate with Wich is i guess a mistake. Above questions is asking specifically why. I dont really care why google crawling my site. I just want to block it. Show 404 status.
So, on all of our sites that are not search facing we've applied a robots.txt file (per , or any other similar question). However, if search terms are specific enough, the domain itself can be found via results. An example of this can be found . As you can see from the link, the domain itself can be found (content is not cached, but domain is listed). Additionally, performing a search with site:hyundaidigitalmarketing.com should 3 results. Checking backlinks provides a few as well, but I obviously cannot prevent them (linking is allowed in context) or control how these are handled (can't tell the host to add nofollow, noindex). Now, I know this is a severe edge case, however my companies clients are doing just this. In fact, our domains are pretty good, so even seemingly arbitrary searches are turning up relevant results. Now, I have to write up a report on how/why this is happening. So, I turn to the wonderful Stack Exchange network to help me either understand what I am missing or understand what is happening. Links to industry articles are extremely helpful but, anything you can give is obviously greatful. I do intend to offer bounties the best I can to make this an answer to turn to in the future. Edit: I've opened a bounty on this question in hopes of getting some more responses on it. I've also provided the results of my own research below.
If you are given a string like "foo bar 32536364" and a regex /foo bar \d+/, how can you check if the regex matches the full string and not some substring in the string? Also I cannot change the input values such as putting ^ and $. Thanks
How can I test if a RegEx matches a string exactly? var r = /a/; r.test("a"); // returns true r.test("ba"); // returns true testExact(r, "ba"); // should return false testExact(r, "a"); // should return true
I can't quite figure out how to manipulate this into a determinate form — should I try rationalizing it by multiplying by the conjugate, completing the square, or something like that? Note: I'm in precalc, so haven't learned any fancy calculus theorems, etc.
How would you evaluate the following limit: $$\lim_{x\to \infty}\sqrt[6]{x^{6}+x^{5}}-\sqrt[6]{x^{6}-x^{5}}$$ I tried to use this formula: $a^{3}-b^{3}=(a-b)(a^{2}+ab+b^{2})$, It didn't work. Any hints?