body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I did not have enough rep to answer or comment on the original question, but I wanted to contribute my findings. See for the original question. I received a warning similar to the one below, although the error code might have been different. The following feature couldn't be installed: .NET Framework 3.5 (includes .NET 2.0 and 3.0) Error code: 0x800F081F I tried running the update through the "Windows Features" dialog after each change, and reverted a change when it did not work where applicable. I tried different VPN's, changing the settings for "Specify settings for optional component installation and component repair" (source: ), however I did not try offline installation using DISM.exe because I did not have a Win 10 image handy. | When I try to install .net 3.5 I get the follwing message: The following feature couldn't be installed: .NET Framework 3.5 (includes .NET 2.0 and 3.0) Error code: 0x800F081F I tried with a standalone package and through Windows Features. Update: Internet connection is fine. |
In many languages, we use new to instantiate a new instance of a class. For example, in Java: class MyClass { int number = 1; MyClass(int n) { self.number = n; } } MyClass obj1 = new MyClass(5); However, as I've been using Python more and more, I've come to wonder why the new keyword is even necessary. In Python, we can simply do: class MyClass: def __init__(self, n): self.n = n obj1 = MyClass(5) So, what's the purpose of the keyword? Is there some syntactic ambiguity that we resolve by using the keyword? | Why does the exist in modern languages such as C# and Java? Is it purely a self documenting code feature, or does it serve any actual purpose? For instance the following example: Class1 obj = new Class1(); Class1 foo() { return new Class1(); } Is as easy to read as the more Pythonesque way of writing it: Class1 obj = Class1(); Class1 foo() { return Class1(); } EDIT: hit the nail on the head with the clarification of the question: Why did they choose this syntax? |
I've uninstalled McAfee and downloaded a new antivirus program. However, I am now noticing there are a number of folders with McAfee still saved under Windows/System32 folder as well as AppData folder. Would this cause issues with the new antivirus running, given there are still some files/folders from the old one on the PC? Is it safe to delete these? | So I'm cleaning out an old computer, and several of the programs it thinks it has were actually installed on an old drive, that's now gone. For some of them, it prompts to get rid of them because it can't find the drive, so that's all well and good. But, for LibreOffice and a couple of others, it tries to run the LibreOffice Uninstaller, and only quits with a fatal error when the LibreOffice uninstaller can't find the drive. The difference here is that in the first case, Windows can't even find the drive with the uninstallers on them, so it prompts to remove them; but in the second, its found the uninstallers on the local disk somewhere and is trying to run them, prompting a fatal error when the uninstaller can't find them. What should I do here? How can I remove what's left of these programs/erase their names from the family tree? Thanks! evamvid |
If $0< \alpha, \beta< \pi$ and $\cos\alpha + \cos\beta-\cos (\alpha + \beta) =3/2$ then prove $\alpha = \beta= \pi/3$ How do I solve for $\alpha$ and $\beta$ when only one equation is given? By simplification I came up with something like $$ \sin\frac{\alpha}{2} \sin\frac{\beta}{2} \cos \frac {\alpha +\beta}{2}=\frac{1}{8}. $$ I don't know if this helps. How to do this? | If $0\leq x,y\leq\frac{\pi}{2}$ and $\cos x +\cos y -\cos(x+y)=\frac{3}{2}$, then how can I prove that $x=y=\frac{\pi}{3}$? Your help is appreciated.I tried various formulas but nothing is working. |
I am new to working with time series. I have come across the statement that k-fold cross-validation is not be suitable for time-series, but I have a doubt that this restriction does not apply to my situation. My time-series are restricted to a certain interval, let's say 12 months. Furthermore assume that I have 100 samples of time series, respectively 100 sequences of values, for which I assume that they were generated by the same process. The individual samples (one sample = one series = one sequence) are incomplete, for example one sample could have missing measurements in month 1 and 6, and another sample misses measurements in months 2 and 4. I want to learn/create a model which allows me to predict the missing values of samples I haven't seen before. Naively, I would assume that I can do 5-fold cross-validation here by splitting my 100 samples into five folds of 20 samples each, train on four folds and validate on the fifth, repeating for all possible validation folds. I don't see how this could lead to data-leakage, since I do not split any one series into several parts. Rather, I treat each series as an individual sample. Am I correct in my assumption that I am doing something else than the usual 'forecasting' here, because I assume a restricted time-horizon, into which my inference falls as well? What is the name of this problem? I assume one could still say that I am forecasting in some sense, because in inference I might be confronted with a series which misses data for all but the first month. Or am I missing something fundamental here and cross-validation is indeed inappropriate? | Hyndman's great explanation of proper time series CV is at the bottom of the page in the following link: Leave-One-Out illustration in the following link: In the 'leave one out' illustration if the dataset in the illustration was time series data and was sorted from past to present from left to right, wouldn't it be identical to Hyndman's explanation on Time Series CV? If not, how so? |
I'm learning about phrasal verbs, but I'm not sure if I'll use them correctly. Which one of the following phrasal verb uses correct: -I don't know how to turn down the volume? -I don't know how to turn the volume down? I always think that they're same, but lately I feel like there must be a rule how to use them correctly, or perhaps they get different meanings? | Another murky subject arose today: Would like to know, which one is appropriate: I am unable to attend the mandatory meeting; I will make up some excuse. Or: I am unable to attend the mandatory meeting; I will make some excuse up. |
I encountered this situation a few times before, but I didn't care much. This is a bit annoying for mobile users, me alike. Yesterday I added a comment to using the Stack Exchange iOS mobile app, which was for my own question. After that, I was greeted with a blank page, which you can see below. Commenting was successful, and it's there. Why is this happening? EDIT: I was made aware that this question already has an answer , but it doesn't. The OP probably put their comment as an answer. . I am running version 1.6.6.2 of the app. | Since iOS 11.2 all the way through 12.2 beta 4, if you post or discard a comment on any post on any SE community, the screen will turn white. This has been ongoing continuously for a year now, and it affects both the SE app and the SO app. You can go back to the previous screen and open the question again, and everything appears as normal. You can also rotate the screen to get the text to come back. Using the arrows to navigate between the question and answers updates the HUD, but the screen remains white unless one of the above is done to get the text back. UPDATE: After posting anything (comment, answer), the screen goes all white except for the sidebar. Perhaps it is intentional, but I prefer last week’s behavior of going back to the content. Not major, since the sidebar icons still work. |
I’m having a pool put in and the pool guys said they need a 20 amp breaker for the pool equipment. My outside panel says 100 amps (see picture). But my panel inside adds up well over 100 amps. Is this normal? The breakers never trip even with the dryer, AC, and other appliances running. | So I know practically nothing about houses having rented for many years, just bought a house and was told by my inspector the panel is only a 70 amp panel and will need to be upgraded before I go to install AC. I took him at his word, and had one AC consult, mentioning this to the guy he looked at my panel and agreed it needed an upgrade. He gave a terrible quote ($5500 for a 3 ton goodman AC install without the electrical work, no ducting work necessary), so I got somebody else to give me a quote. Now here's the problem: Fellow comes over and says I have a 150 amp panel and there's room (which I can see) for a couple more breakers on it, and gives me a considerably better AC quote (3500 for a lennox 3 ton 14 seer, all the same bells and whistles). So now I'm thinking, considering how terrible the quote was from the first consult, perhaps he was just trying to squeeze even more money out of me? Why did my inspector tell me it was a 70 amp panel? I look at the panel and there's like 6 or 8 15/20 amp breakers on it as well as a 30 amp double-breaker thingy (not sure if this is 30 per or 30 total) and a 50 amp double-breaker thingy. I'll get a picture when I get home to post here, but off hand my question is: Is it accurate to say I definitely have over a 70 amp panel due to the sum of amps on breakers in there right now? Is the sum of those little labels on the breakers make up my panels current amperage? I look online for 70 amp panel and it's this tiny dinky thing with 3 breakers on it.. Edit: Here are the pictures, if this is not a 70 amp can anybody identify the amps? Appearances to me are the diagram on the box does not match the actual panel, as the panel has 20 breaker spots (as I read it) while the diagram shows 14. And yes, I realize it's missing a main breaker, so I included the other two pieces I understand identify the max amp load; the conduit and the meter. |
Could I submit a (Math) paper in a journal (i.e. or ) as an independent researcher (not associated with any university)? What is the process to submit a paper without affiliation? | Assume you have already completed your undergrad and have been working for a number of years. Does one need to be part of a university or a learning institution to publish papers? |
Getting table cells values on checkbox selection //function to get table cells values function n() { $('.m').on('click',function() { var id = $(this).closest("tr").find(".t").text(); var p= $(this).closest("tr").find(".t1").text(); $('#c').append('<span>', id, '</span>'); }); } for(int i=0;i<10;i++) { div.innerHTML="<table><tr><td><input type='checkbox' class='m' onclick=n()></td><td class='m'>data</td><td class='t1'>data</td></tr></table>"; } //appending values on checkbox selection <div id='c'></div> While checkbox selected getting values of table rows in function n() in above example, but value appends in div#c, in such way as on first checkbox click goes 2 times, on second click 3 times prints and so on. Why this happens? | 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. |
I would like to backup photos and videos in the Compact Flash memory card directly to connected USB 2.0 or IEEE1394 enabled portable disk drive. As I will be photographing in remote region using my EOS 7D, I prefer not requiring a laptop as intermediate CPU to copy the files. | This question seems similar to , but my needs are different : I shoot in RAW exclusively I'm looking for a 100% offline solution: while traveling, Internet won't be accessible the "laptop" solution is too heavy for me: I'm looking for a lightweight solution the simplest, the better: one device to rule them all EDIT: I'm using good old Compact Flash cards (yes, the bigger ones), so I need a device that can read it. If it can read from other cards, this question might be interesting for more people than myself - that's the whole purpose of the website. Also asked by : Portable Storage Device while traveling I need storage device which is able to read CF cards and make a backup of my photos while traveling. I do not want to carry laptop (it's bulky) and tablet (too little storage) but looking into some other solutions. So far I found: Epson PXXXX - price is blocker for me Jobo Giga Vu - same as above Nexto DI - bit better, but still a lot Hyperdrive Colorspace UDMA - this looks the best for price/options Wolwerine PicPac - cheap, bad opinions DigitalFoci PhotoSafe - same as above Ex-Pro® Picture 2 Drive - didn't find much about it So ladys & gents what do you use? |
Im trying to pass the following regex to javascript but I couldn't achieve passing it. I was the entire afternoon trying to successfully use it for my project, but sadly I couldn't find the way to make this work. Here's the link of the regex: Regex: ((?<![\\])['"])((?:.(?!(?<![\\])\1))*.?)\1 Test string: [1, "c", "[\"asd\" , 2]"] What I want to achive is to get outer quotes of a given string. The regex was taken from here: | I need a Perl regular expression to match a string. I'm assuming only double-quoted strings, that a \" is a literal quote character and NOT the end of the string, and that a \ is a literal backslash character and should not escape a quote character. If it's not clear, some examples: "\"" # string is 1 character long, contains dobule quote "\\" # string is 1 character long, contains backslash "\\\"" # string is 2 characters long, contains backslash and double quote "\\\\" # string is 2 characters long, contains two backslashes I need a regular expression that can recognize all 4 of these possibilities, and all other simple variations on those possibilities, as valid strings. What I have now is: /".*[^\\]"/ But that's not right - it won't match any of those except the first one. Can anyone give me a push in the right direction on how to handle this? |
I am trying to connect a MSSQL database from a Ubuntu 14.04 machine. I am using FreeTDS to connect, by following this tutorial [ I'm stuck with the final stage, after giving the following command : isql -v MSSQL devuser 'devpass' Ubuntu is giving me the following error : [IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified [ISQL]ERROR: Could not SQLConnect How can I overcome this issue and connect the MSSQL database? Update 1 My problem is half solved now. Driver has been found now. At this moment it is showing the following error. [IM002][unixODBC][Driver Manager]Data source name not found [IM003][unixODBC][Driver Manager]Host name unknown [ISQL]ERROR: Could not SQLConnect | Ubuntu 14.04.1 LTS From my Ubuntu machine I want to access an MS SQL 2005 server via ODBC. This MSSQL server is on our internal network. I've installed these packages: unixodbc, unixodbc-dev, unixodbc-bin, libodbc1, libtool, autotools-dev and several other dependencies. Also tdsodbc, freetds-bin, freetds-common, freetds-dev, libct4. But I can't seem to find where the .so file is to use it in my DSN in /etc/odbc.ini. Which file do I use? Doing this: echo "select 1"|isql -v mydsn gives me this error: [01000][unixODBC][Driver Manager]Can't open lib '/usr/lib/libtdsodbc.so' : file not found [ISQL]ERROR: Could not SQLConnect The 'mydsn' is trying to point to /usr/lib/libtdsodbc.so but it's not there. Which .so file do I set up in the /etc/odbc.ini file? Thank you. |
In tikz, I define a variable outside \foreach loop, and use \pgfmathtruncatemacro command to increase it inside the loop. Below is my MWE. \documentclass{article} \usepackage{pgfplots,tikz,tikz-3dplot} \begin{document} \begin{figure} \centering \begin{tikzpicture} \pgfmathtruncatemacro\j{1}; \foreach \i in {1,4,7} { \node at (\i,1.4) {\j}; \pgfmathtruncatemacro\j{\j+1}; \node at (\i+1.5,1.4) {\j}; \pgfmathtruncatemacro\j{\j+1}; \node at (\i,0) {\j}; \pgfmathtruncatemacro\j{\j+1}; \node at (\i+1.5,0) {\j}; } \end{tikzpicture} \end{figure} \end{document} Instead of increasing the value of \j up to 12, it resets back to 1 after only one iteration of the loop. What am I doing wrong? | I'm trying to plot some recursively defined sequence with tikz and am encountering some behavior I can't understand, here is my code: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\f}{1} \foreach\i in {1,...,10} { \pgfmathsetmacro{\ff}{\i*\f} \draw (0,\i) node {\ff}; \pgfmathsetmacro{\f}{\ff} } \end{tikzpicture} \end{document} I would have expected this to print the sequence of the factorials of the first ten integers (going down) but what I get is 10,9,...,1. What is happening ? How can I handle such recursively defined functions in Tikz ? |
I did some research and some say they are same and interchangeable but some says they are different. What I understand is that Bandwidth is the amount of data carried while the Speed is the data carried at a certain rate. So, when we get Internet plan from our ISPs and they say that the speed would be, for example, 50Mbps. Is that Bandwidth or Speed? I am a little confused. Can anyone shed some light on it and make it clear? Thank you in advance | I have an internet connection that provides a bandwidth of 256 kbps. However, when I download a file, the downloading software displays numbers like 30 kbps, 40 kbp etc. and keeps changing. I have never seen it showing 256 kbps. What I want to know is that even though I have a connection which has 256 kbps bandwidth, when somthing is being download it doesn't use the full 256 kbps bandwidth. I want to know what do the numbers 30 kbps, 40 kbps indicate ? Do they indicate speed. Please help me to understand this. |
I'm a veteran hobbyist photography with a so-so photography IQ in the moment, by no means a settings expert. I often shoot landscapes and wildlife, but also will be taking pictures for my university's basketball/football/baseball teams. I have a Canon Rebel t7i and a 24-105L f/4 IS USM and am looking for a good telephoto - but don't have a bunch of money to splurge on one. I know in a perfect world I get the Canon 70-200L f2/8 IS USM but that is just too pricey for me. So, I've looked into a variety of alternatives and would love advice based on my budget and the subjects/events I normally shoot: Third Party Lens - Sigma or Tamron nomination 70-200L f/4 IS ll USM 70-200L f/4 USM (no Image Stabilization) 80-200L f2.8 (No IS and no Ultra Sonic Motor) I would especially love some information about what/where I would by hurt by the lack of a USM. Thanks | This is a two parts question 1) Is there a significant reason I should get the Tamron 70-200 G2 rather than the Tamron SP 70-200mm F2.8 Di VC USD? 2) Would getting the Canon 70-200L (first version) be a better purchase then the Tamron in question 1? |
I have built universal jQuery plugin using jQuery Dialog to displays messages. now this is called my jQuery $.ajax -->done function . I need to capture Dialog close event in .ajax function so that I can redirect page after that accordingly. How I achieve this?? Ajax function $('#NewFunctionNavigationForm').submit(function (e) { e.preventDefault(); var DataToPost = JSON.stringify($('#NewFunctionNavigationForm').serializeObject()); var formURL = $(this).attr("action"); $.ajax({ type: "POST", url: formURL, dataType: "JSON", contentType: "application/json; charset=utf-8", data: DataToPost, }) .done(function (data, textStatus, jqXHR) { alert("Success: " + data.Response); $(this).MyMessageDialog({ _messageBlockID: "_StatusMessage", _messageContent: "ccc" }); ????????????? i need to capture dialog close event here?? window.location = "/SystemCore/SystemCoreHome"; }) .fail(function (jqXHR, textStatus, errorThrown) { alert("Error"); }) .always(function (jqXHROrData, textStatus, jqXHROrErrorThrown) { alert("complete"); }); }); message Dialog plugin function ($) { var _messageWrap = { _messageBlockID: "", _messageContent: "" }; $.fn.MyMessageDialog = function (_messageWrap) { alert("from plugin "+_messageWrap._messageBlockID + " " + _messageWrap._messageContent); $("#" + _messageWrap._messageBlockID).text(_messageWrap._messageContent); if($("#"+_messageWrap._messageBlockID).length) //check if div with given ID exists { $("#" + _messageWrap._messageBlockID).dialog({ modal: true, autoOpen: false, buttons: { Ok: function () { $(this).dialog("close"); } }, width: "50%", }); //clear existing content if there are any in given Div $("#" + _messageWrap._messageBlockID).html(""); //add content to div $("#" + _messageWrap._messageBlockID).append(_messageWrap._messageContent); $("#" + _messageWrap._messageBlockID).dialog("open"); } else { alert("not exist"); } }; }(jQuery)); | I am using the plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked but that doesn't cover the user closing with escape or the x in the top right corner. |
We already have the spoiler formatting like this for information that should be hidden until specifically needed (by hovering), and the code snippet formatting like this for code that can be revealed and left visible, but when answering questions that ask specifically for a hint, or a direction (e.g. my answer ) it would be very useful to be able to either create a hierarchical spoiler (such that viewing spoiler 3 reveals spoilers 1 and 2 as well), or a non-code snippet (such that the user can expand the entire post without having to use 'Ctrl+A' to view everything inverted), in order to provide the information that the question asks for specifically, while still solving the problem for future visitors who may want more than a hint. The collapsing is covered in part by , but the idea of hierarchical / sequential spoilers has not been raised / addressed before. | A question with attachments, screenshots and/or long code, makes it vertically long and often difficult to read fast. It would be nice to have a new kind of format, such as 'hideable', with a graphic button or a '+' / '-' sign, so you can add additional details, visible only on a click. |
My computer has a error that is preventing it from booting to the desktop. The error message is Warning failed to connect to lvmetad no such file or directory falling back to internal scanning It happened right after I installed GNOME, how to fix the error? | My Ubuntu laptop which was working fine until recently. My desktop disappeared and all the desktop icons are gone. All I have access to is the terminal. In an attempt to fix the problem, I installed GNOME but it made the computer give the error: Warning! Failed to connect to lvmetad. No such file or directory Falling back to internal scanning. I can press Ctrl+Alt+F1 to start tty1 but I can't get to a graphical user interface. What did I do wrong and how do I fix it?. The operating system is ubuntu Linux |
Let $R$ be the relation on $N\times (N\setminus\{0\})$ defined by $((a, b),(c, d)) \in R$ if $ad = bc$. Prove that $R$ is an equivalence relation. I'm pretty confused with this problem, mainly because I don't understand the significance of $(N\setminus\{0\})$. Any ideas on how to solve this? | If $N$ is the set of all natural numbers, $R$ is a relation on $N \times N$, defined by $(a,b) \simeq (c,d)$ iff $ad=bc$, how can I prove that $R$ is an equivalence relation ? |
Given two polytopes $P_1, P_2$ then define the graph on $P_1 \times P_2$ as follows: $[(a,b),(x,y)]$ is an edge in $P_1 \times P_2$ iff $a=x$ and $[b,y]$ is an edge in $P_2$ or $b=y$ and $[a,x]$ is an edge in $P_1$. Is this new structure a polytope? | How do we calculate the Cartesian product between $n$ polygons? Is it always a polytope? If so, can we say anything about its faces? For example, $n$ squares: $\{S_1:[a_1, a_2] \times [b_1, b_2], \ldots, S_n:[a_k, a_{k+1}] \times [b_{k}, b_{k+1}]\}$ so, $S_1 \times \ldots \times S_n \in \mathcal{R}^n$ forms a $n-$dimensional box. |
Assuming each coin flip is independent of each other, and chance for heads is $50\%$. How can we calculate the chance that after $n$ flips having gotten 6 heads in a row at least once? | Tossing a fair coin for $N$ times and we get a result series as $HTHTHHTT\dots~$, Here '$H$' denotes 'head' and '$T$' denotes 'tail' for a specific tossing each time. What is the probability that the length of the longest streak of consecutive heads is greater than or equal to $k$? (that is we have a $HHHH\dots~$, which is the substring of our tossing result, and whose length is greater than or equal to $k$) I came up with a recursive solution (though not quite sure), but cannot find a closed form solution. Here is my solution. Denote $P(N,k)$ as the probability for tossing the coin $N$ times, and the longest continuous heads is greater or equal than $k$. Then (For $N>k$) $$ P(N,k)=P(N-1,k)+\Big(1-P(N-k-1,k)\Big)\left(\frac{1}{2}\right)^{k+1} $$ |
I have been deported from UK two years ago, because I was charged and sentenced for criminal offence. Would there be any issue if I apply for schengn tourist visa | I have a friend; he’s been living in the UK since he was 18. He has applied for family and work visas but the UK has refused all of them. He got married to someone in the UK. Immigration didn’t think it was real and he got deported. He ended up coming back. Now he has met a girl and they are trying to do his papers again. He went back to his country and is applying there but will the visa get approved since he has been deported? |
It is a simple code, what I am looking for is to learn the best practices that I can implement, when trying to refactor the show method, to a method that is closed to modifications. so that in the future if they ask me to enter a new card with a value of type chain, it is not necessary to modify this method. class Card: def __init__(self, suit, value): self.suit = suit self.value = value def show(self): if self.value == 1: value = "Ace" elif self.value == 11: value = "Jack" elif self.value == 12: value = "Queen" elif self.value == 13: value = "King" else: value = self.value return f'{value} of {self.suit}' | I want to write a function in Python that returns different fixed values based on the value of an input index. In other languages I would use a switch or case statement, but Python does not appear to have a switch statement. What are the recommended Python solutions in this scenario? |
I am comfortable with the argument that in order for the wavefunction to be single valued/2$\pi$ invariant this means that $L_z$ must be an integer value of $\hbar$. $$U(2\pi e_z)=e^{-(2\pi i/\hbar)\hat L_z}=1$$ However I don't know how it follows from this that $|L|^2 = \beta \hbar^2$ where $\beta$ in an integer. $L_x$ and $L_y$ are indetermined so it seems fishy to say 'if' they were measured they would have integer $\hbar$ values and so $L_x^2 + L_y^2 + L_z^2$ would be an integer $\hbar^"$ value, since we can never actually measure all of these at once. | I simply have no idea how this result is found $$I=\hbar \sqrt{\ell(\ell+1)}.$$ The result seems to just be dumped in textbooks rather than explained. I can get the result that $I_z=\hbar m_j$. Please explain as clearly as possible how this is derived. Also, any pointers towards any books/videos that may help me learn quantum mechanics would be appreciated. |
I also learned that to get a list of tax rates for the territory I need to use the address and possibly a zip code. Is there a unified method for storing a structure of addresses in the database? | Take the representation of an Address, here below is a complete and very detailed implementation: here instead is a quick implementation (which more or less contains the same fields, imagine all fields in the former are contained also in the second) If I were to decide which is the closer to a normalized and academically correct one I'd say the first one, however if I were to start a project I would go with the second. Do you agree with this consideration? And if yes, how does one deal with this fact? start with an easy database and as soon as it is time improve it into a more normalized/academical database. start with something as close as possible to the academical database stick with the quick and dirty solution |
How can I add to pie charts in ArcGIS (10.1) labels of the values the charts are created with? | I am creating a Location Pie chart for my study area using Male and Female population in ArcGIS for Desktop. The software creates for legend of charts but I want to create a label on chart itself. How do I do this in ArcMap? |
Firstly I am very new to Linux i.e. never used it before (have used plenty of other OS) I have an old desktop computer -motherboard in an intel d865gbf and I would like to run Ubuntu linux on it. What version must I download and where do I get it? Thanks in advance for your help | For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and such as: with a lighter desktop than the usual Gnome and Unity with the even lighter LXDE desktop Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements? |
My attempt $$\sum_{r=0}^{n} r \times \frac nr \left[\binom {n-1}{r-1} \right]^2$$ $$=n\sum _{r=0}^{n} \left [\binom {n-1}{r-1}\right]^2$$ The square on the binomial coefficient is throwing me off, otherwise it would have been easier to proceed. I don’t know what to do with that square. Edit: As pointed out in the comment, i managed to find out $$\sum_{r=0}^n (\binom nr )^2 = \binom {2n}{n}$$ But using this in the above expression isn’t giving me the right answer. Am I supposed to make a modification to the limits in the sigma function? | Please help me evaluate the following series. $$\sum_{k=0}^{n} k{n\choose k}^2.$$ |
I am currently an undergrad student in computer engineering in Brazil and I have taken the Quantum mechanics subject as well as I am did a (the two jupyter notebooks, it's in portuguese though) on quantum computing with a teacher that is currently building one at my college. Apart from the chances I already have of learning about this subject are there other means or opportunities any of you recommend going after? | I am a computer science student and am currently searching for resources from where I can learn about quantum computers, quantum computing models, their working principles, their gates and some simple quantum algorithms. |
I have 2 versions of Blender, 2.79 and 2.9. I edited a .blend file that was made in 2.79 today in 2.9, then saved. Now, I cannot open it in 2.79 anymore (it just crashes Blender). However, there are plugins in the 2.79 version that I haven't yet installed, or might not exist in 2.9. And I have to deliver some files. I now that all Adobe apps allow you to export documents to a previous version if you need, but I couldn't find anything about Blender. I would prefer not to have to redo textures, etc. Can I export the file from 2.9 to 2.79 easily? | I was experimenting with a file in 2.8 and accidentally saved it. When I opened it back in 2.79 I can't see my model. It disappeared with the error File written by newer Blender binary. How can I get my model? I can see my model in 2.8 but nothing in 2.79. I tried to export it in .obj, but I lost all my modifiers, material and camera setting. |
Hi guys this is my first time using this website and I thought it would be useful as I am currently in 7th grade doing Maths Olympiad and studying permutation and combination here is my question ----> Mrs Reed forgets the combination number to her safe. The combination has 4 numbers, each a 1 digit number. The 4 digits add up to 10 and there is no zero. How many times at the most does Mrs reed have to try to open her safe? Thanks and pls note that I am currently in Grade 7 so pls explain it so I am able to "understand" | Mrs Reed forgets the number combination to her safe. The combination has $4$ numbers each is a $1$ digit number. The $4$ digits add up to $10$ and there are no zeros. How many times does Mrs Reed have to try to open her safe? My attempt: ${9 \choose 3} = 84$ but the answer is $80$. |
I've been working on the following exercise and got stuck: "Prove that a connected Riemannian manifold is complete if and only if every regular curve that diverges to infinity has infinite length." Here, a curve with domain $[0,b)$ (and $b$ possibly infinite) diverges to infinity if for every compact subset of the manifold, there exists a time beyond which it does not intersect the compact set anymore. I was able to prove the forward direction, but I can't figure out how to get the converse. I've tried both to show that maximal geodesics are defined for all time, and when that didn't work, I tried to show Cauchy sequences converge, but I didn't have success in either case. Any advice is greatly appreciated. | A divergent curve on a noncompact Riemannian manifold $M$ is a curve $\alpha:[0,\infty)\to M$ where given any compact $K\subset M$ we have there exists $t_{0}$ such that $\alpha(t) \notin K$ for $t>t_{0}$. Subsequently the length is defined in the usual sense for curves on a manifold: $L(\alpha)=\int_{0}^{\infty} ||\alpha′(t)||dt$. The problem is Prove that a noncompact manifold is complete if and only if every divergent curve has unbounded (i.e. infinite) length. I proved that if M is Complete ⟹ Every divergent curve has unbounded length. But i don't know how i prove the reciprocal. Thanks |
Hey, I am trying to put a little logic into my C# app that will create a table called Import, IF it doesn't already exist.. here is my code, it doesn't seem to work tho. con.Open(); using (SqlCommand cmd = con.CreateCommand()) { cmd.CommandText = @" IF (EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'RX_CMMData' AND TABLE_NAME = 'Import')) BEGIN CREATE TABLE Import ( RowId integer PRIMARY KEY NOT NULL, PartNumber varchar(200) NOT NULL, CMMNumber varchar(200) NOT NULL, Date varchar(200) NOT NULL, FeatType varchar(200) NOT NULL, FeatName varchar(200) NOT NULL, Value varchar(200) NOT NULL, Actual decimal, Nominal decimal, Dev decimal, TolMin decimal, TolPlus decimal, OutOfTol decimal, FileName varchar(200) NOT NULL ); END"; cmd.ExecuteNonQuery(); } con.Close(); | I would like this to be the ultimate discussion on how to check if a table exists in SQL Server 2000/2005 using SQL Statements. When you Google for the answer, you get so many different answers. Is there an official/backward and forward compatible way of doing it? Here are two possible ways of doing it. Which one among the two is the standard/best way of doing it? First way: IF EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE' AND TABLE_NAME='mytablename') SELECT 1 AS res ELSE SELECT 0 AS res; Second way: IF OBJECT_ID (N'mytablename', N'U') IS NOT NULL SELECT 1 AS res ELSE SELECT 0 AS res; MySQL provides the simple SHOW TABLES LIKE '%tablename%'; statement. I am looking for something similar. |
How does light and light energy "breakdown" (when light is reflected, some light will be transmited, absorbed, or reflected, just like energy associated with light) depend on wave frequency? I've looked up similar questions, but they only seem to explain why light frequency doesn't change during reflection, and not why and how does the wave frequency influences the reflection. | I was surprised to see that the Fresnel equations for reflection depends on refractive index and angle of incidence, but they do not depend on frequency. Why is this case? Are they restricted to regions that do not show frequency dependence? |
My charging port is broken. Need to make a charger, thanks for help. | I have a ES cordless drill and it has a Li-Ion battery (model is ES GB118L20). The original battery charger is missing and there is almost no way for me to get one in my country. The Battery has 5 Samsung INR18650-20R 3.7v cells connected in series. The battery pins are BATTERY+, BATTERY- and 4 pins marked BATTERY1, BATTERY2, BATTERY3 and BATTERY4 which are connected between + and - of batteries (probably used for balanced charging). Also there are T, BS and ID pins which I'm not sure of their role. I tried charging the cells one by one by connecting a TP4056 charger to each battery pin (for example [BATTERY- and BATTERY1] or [BATTERY1 and BATTERY2], but was not successful. It didn't even start charging it. Can anyone help me how to charge this thing? |
I am unsure if this is even possible, but basically, I have event listeners that were automatically added to a checkbox control by a library (jQuery). Inspecting the control in Chrome Developer Tools, under the Event Listeners, I can see that touchmove has been attached to my control. How would I be able to basically remove that Event Listener, particularly if I don't know the function that was attached to it? Looking for some advice. Thanks. | I have an input type="image". This acts like the cell notes in Microsoft Excel. If someone enters a number into the text box that this input-image is paired with, I setup an event handler for the input-image. Then when the user clicks the image, they get a little popup to add some notes to the data. My problem is that when a user enters a zero into the text box, I need to disable the input-image's event handler. I have tried the following, but to no avail. $('#myimage').click(function { return false; }); |
I'm tring to read from text file in hebrew but i get some jebrish... this is my code: try { workFile =new File("tripShosWork.txt"); homeFile =new File("tripShosHome.txt"); BufferedReader homeBr = new BufferedReader(new FileReader(homeFile)); BufferedReader workBr = new BufferedReader(new FileReader(workFile)); home = new String [98]; for (int i = 0; i < home.length; i++) home[i] = homeBr.readLine(); work = new String [19]; for (int i = 0; i < work.length; i++) { work[i] = workBr.readLine(); } } catch (Exception e) { e.printStackTrace(); } System.out.println(Arrays.toString(work)); System.out.println(Arrays.toString(home)); i need your help! | I tried to use java.io.FileReader to read some text files and convert them into a string, but I found the result is wrongly encoded and not readable at all. Here's my environment: Windows 2003, OS encoding: CP1252 Java 5.0 My files are UTF-8 encoded or CP1252 encoded, and some of them (UTF-8 encoded files) may contain Chinese (non-Latin) characters. I use the following code to do my work: private static String readFileAsString(String filePath) throws java.io.IOException{ StringBuffer fileData = new StringBuffer(1000); FileReader reader = new FileReader(filePath); //System.out.println(reader.getEncoding()); BufferedReader reader = new BufferedReader(reader); char[] buf = new char[1024]; int numRead=0; while((numRead=reader.read(buf)) != -1){ String readData = String.valueOf(buf, 0, numRead); fileData.append(readData); buf = new char[1024]; } reader.close(); return fileData.toString(); } The above code doesn't work. I found the FileReader's encoding is CP1252 even if the text is UTF-8 encoded. But the JavaDoc of java.io.FileReader says that: The constructors of this class assume that the default character encoding and the default byte-buffer size are appropriate. Does this mean that I am not required to set character encoding by myself if I am using FileReader? But I did get wrongly encoded data currently, what's the correct way to deal with my situtaion? Thanks. |
Given $(G,\cdot)$ a topological group with identity $e$, is it always true that $\pi_1(G,e)$ is abelian? For what it's worth: I have already shown that if $f,g\in\Omega(X,e)$, then $[f \times g]=[f\cdot g]$, where "$\times$" is the ordinary path multiplication (left to right), "$\cdot$" is the group multiplication (that's to say, $f\cdot g(t)=f(t)g(t)$) and $[\cdot]$ is the homotopy class. So in view of this property, if $G$ is abelian itself then $\pi_1(X,e)$ is trivially abelian too. However, I have no clue how to proceed when $G$ is nonabelian. | Hypothesis: Let $G$ be a topological group with identity element $e$. Let $\mu$ denote the multiplication mapping in $G$. Goal: Show that $\pi_1(G,e) = \pi(G)$ is an abelian group via the hint below. Hint: There are two products on $\pi(G)$. The usual product $\circ$ defined for the fundamental group and the product $\ast$ induced by $$ \ast: \pi(G) \times \pi(G) \cong \pi(G \times G) \overset{\pi(\mu)}{\rightarrow} \pi(G). $$ Show that there is a common two sided unit, $u \in \pi(G)$ for both products and there is a distributive law $$ (f \ast g) \circ (a \ast b) = (f \circ a) \ast (g \circ b) $$ Attempt: Suppose the distributive law in the hint holds. Suppose further that $1$ -- the identity element in $\pi(G)$ with respect to $\circ$ -- serves also as the identity element in $\pi(G)$ with respect to $\ast$. Then for $a,b \in \pi(G)$, we would have the following relationship: $$ (1 \ast a) \circ (b \ast 1) = (1 \circ b) \ast (a \circ 1) $$ so that $$ a \circ b = b \ast a $$ Then if we can show that for all $f,g \in \pi(G)$ that $f \ast g \iff f \circ g$, we could complete the above relation to $$ a \circ b = b \ast a = b \circ a $$ so that $\pi(G)$ is abelian as desired. Question: Am I on the right track? |
I am looking for multiple proofs of that statement: here $\phi(n)$ denotes the Euler’s totient $$\sum_{d|n}{\phi(d)}=n$$ Here’s one: By unique factorisation theorem: $n=\prod_{k=1}^{m}{p_k^{\alpha_k}}$ and $d=\prod_{k=1}^{m}{p_k^{\beta_k}}$ where $0\leq \beta_k\leq \alpha_k$ so: \begin{align} \sum_{d|n}{\phi(d)}&=\sum_{0\leq \beta_k\leq \alpha_k}{\phi\left(\prod_{k=1}^{m}{p_k^{\beta_k}}\right)}\\ &= \sum_{0\leq \beta_k\leq \alpha_k}{\prod_{k=1}^{m}\phi({p_k^{\beta_k})}}\\ &=\sum_{0\leq \beta_k\leq \alpha_k}{\prod_{k=1}^{m}{(p_k^{\beta_k}-p_k^{\beta_k-1}})}\\ &=\prod_{k=1}^{m}{\sum_{0\leq \beta_k\leq \alpha_k}{(p_k^{\beta_k}-p_k^{\beta_k-1}}})\\ &= \prod_{k=1}^{m}{p_k^{\alpha_k}}\\ &=n. \end{align} | If $k$ is a positive natural number then $\phi(k)$ denotes the number of natural numbers less than $k$ which are prime to $k$. I have seen proofs that $n = \sum_{k|n} \phi(k)$ which basically partitions $\mathbb{Z}/n\mathbb{Z}$ into subsets of elements of order $k$ (of which there are $\phi(k)$-many) as $k$ ranges over divisors of $n$. But everything we know about $\mathbb{Z}/n\mathbb{Z}$ comes from elementary number theory (division with remainder, bezout relations, divisibility), so the above relation should be provable without invoking the structure of the group $\mathbb{Z}/n\mathbb{Z}$. Does anyone have a nice, clear, proof which avoids $\mathbb{Z}/n\mathbb{Z}$? |
I downloaded the driver for the HP LaserJet Pro M15w printer on this , whether this website is safe to use | Let's assume that one has some HP printer and/or scanner and checked its support status on the corresponding page of HPLIP site - . So one have the following information: the device Model name, Min. HPLIP Version and Driver Plug-in need. What should one install to make Ubuntu fully support the HP printer and/or scanner? |
I want to start learning game development and I would obviously come across this tool. So every where I went people mentioned Unreal Engine 4 to be a viable choice, I've tried a bit of Unity and now I want to try Unreal. Only issue I came across UDK and UE4, I downloaded UDK which turns out to be different from tutorials and I can't seem to find any info on that and besides I could only run the software once because after the first time it starts a game, I re-installed UDK I still get the issue, but anyways that's a different topic, what I want to know is whether UDK and UE4 are different and if they are, where do i get UE4, becauuse when I down UE4 (from - ), it downloads a game launcher and no development tool. In case they are same, why is my version of UDK different fr | I'm thinking of learning Unreal Engine 4, but it costs money, and I want to try and keep costs as low as possible while I'm learning. In contrast, the Unreal Development Kit is free. How similar are the two? If I learn UDK first, how easily can I transition to UE4? |
Realized vs realised, randomized vs randomised etc. Is it true that the former is always correct in US and the latter in UK english? Is there a list of english-speaking nations that use the former or the latter? | I have trouble understanding why some words change "s"-es to "z"-s from BE to AE and some not. For example: analyse -> analyze characterise -> characterize hypnotise -> hypnotize But: compromise -> compromise Is there any rule to this? Slightly related: |
problem 5.5.36 - Let $\mathscr{X}$ be a separable Banach space and let $\mu$ be counting measure on $\mathbb{N}$. Suppose that $\{x_n\}_{1}^{\infty}$ is a countable dense subset of the unit ball of $\mathscr{X}$, and define $T:L^{1}(\mu)\rightarrow \mathscr{X}$ by $Tf = \sum_{1}^{\infty}f(n)x_n$. a.) $T$ is bounded. b.) $T$ is surjective. c.) $\mathscr{X}$ is isomorphic to a quotient space of $L^{1}(\mu)$. Attempted proof a.) We have that $Tf = \sum_{1}^{\infty}f(n)x_n$, hence $$\lVert Tf\rVert = \lVert \sum_{1}^{\infty}f(n)x_n\rVert \leq \sum_{1}^{\infty}|f(n)|\lVert x_n\rVert \leq \sum_{1}^{\infty}|f(n)| = \lVert f\rVert_{1}$$ hence $T$ is bounded. Attempted proof b.) My thoughts here is to assume that $\{x_n\}$ converges to $x$ and $x$ is in $\mathscr{X}$. Then go from there to prove that $T$ is surjective. For c.) I have no clue, any suggestions is greatly appreciated. | Folland, "Real Analysis", Chapter 5.3, Exercise 36: Let $\mathcal{X}$ be a separable Banach space and let $\mu$ be counting measure on $\mathbf{N}$. Suppose that $\left\{x_n\right\}_1^\infty$ is a countable dense subset of the unit ball of $\mathcal{X}$, and define $T \colon L^1(\mu) \to \mathcal{X}$ by $Tf = \sum_1^\infty f(n) x_n$. (a) $T$ is bounded. (b) $T$ is surjective. I have proved (a). I would like help on (b). Here are my ideas so far. Say we want to show $y \in \mathcal{X}$ is in the image of $T$. Reduce to the case $||y|| = 1$ and let $x_{n_m} \to y$. My thought is to produce for each $N$ a function $f_N \in L^1(\mu)$ such that $||y - \sum_n^\infty f(n)x_n|| < 1/N$ and also such that the $f_N$ converge in $L^1(\mu)$ to some $f \in L^1(\mu)$. Then use the continuity of $T$ to conclude $T(f) = y$. The way I have been setting up my inequalities is as follows. Pick $M_N$ such that for all $m > M_N$, $||y - x_{n_m}|| < 1/N$. Then I want to define $f_N$ so that $$\sum_n^\infty f_N(n) = \sum_{m > M_N}^\infty f_N(m) = 1, $$ hence $$||y - T(f_N)|| = ||\sum_{m > M_N}^\infty f_N(m) y + \sum_n^\infty f_N(n)x_n|| \leq \sum_{m > M_N}^\infty f_N(m) || y - x_{n_m} || < \frac{1}{N}. $$ Presumably, if the $f_N$ are appropriately chosen, then I can find a dominating function and apply the Dominated Convergence Theorem to finish up. However, getting all these hypotheses to hold simultaneously has been difficult. In essence, the difficulty seems to be in requiring that the $f_N$ be "normalized" as well as possess a dominating function. If this method is feasible, at least it seems to require a bit of analysis to show the desired series all converge. Perhaps I am missing something cleaner. If so, a simpler solution would be much appreciated. -Thanks. |
I have been assigned to do a job on a server but am unsure what dist is running. /proc/version tells me: Linux version 2.6.18-194.26.1.el5.028stab079.2 (root@rhel5-build-x64) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Fri Dec 17 19:25:15 MSK 2010 so that makes me think Red Hat Enterprise Linux 5 but then i try to install some package and find out that aptitude and apt-get are installed instead of yum. I thought aptitude and apt-get belonged to the debian world. So now I wonder, what distro is running on this server? | Is there a way to determine what version (distribution & kernel version, I suppose) of Linux is running (from the command-line), that works on any Linux system? |
I'm looking for a way to illustrate Trapezoidal rule. I've seen this code to illustrate Riemann sums () but I don't see how to adapt it. \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} \begin{axis}[ xtick={0,1,3,5,7,9,11,13,15,17},ytick={0,...,1.5}, xmax=18,ymax=1.2,ymin=0,xmin=0, enlargelimits=true, axis lines=middle, clip=false, domain=0:17, axis on top ] \addplot [draw=red, fill=red!10, ybar interval, samples=9, domain=1:17] {x^-1}\closedcycle; \addplot [draw=green, fill=green!10, ybar interval, samples=9, domain=17:1] {x^-1}\closedcycle; \addplot[smooth, thick,domain=1:17,samples=40]{x^-1}; \end{axis} \end{tikzpicture} \end{document} Do you have any suggestion ? | I have problem to draw graphic with LaTeX (especially TikZ)? Like this: |
How to prove that if a number is divisible by 2 and 3 both,it is also divisible by 6.It should be proven by using Euclid's Division Lemma. | Why is it that a number such as $108$, that is divisible by $2$ and $3$, is also divisible by $6$? Is this true that all numbers divisible by two integers are divisible by their product? |
I'm trying to learn using git in windows with command line. I want create a txt file in master, then create 2 branches and modify text differently but I have a problem. I succesfully create repository file. Then I add the file and commit it. No problem until this point. After this I create and checkout to new branch with code: git checkout -b feature2 Then I open the text with notepad(with command) and modify and save it. Then checkout to master and when I open the text it is modified version. So I can not create third branch with different text. It seems that there is only one text file to all branches. What do I miss? | I am working on a git repository with a master branch and another topic branch. I have switched to topic branch and modified a file. Now, if I switched to master branch that same file is shown as modified. For example: git status in git-build branch: # On branch git-build # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: cvsup_current # Switch to master branch [root@redbull builder_scripts (git-build)]# git co master M builder_scripts/cvsup_current Switched to branch "master" git status in master branch [root@redbull builder_scripts (master)]# git status # On branch master # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: cvsup_current # Why is that the file is shown as modified in master branch even though it was modified in git-build branch? My understanding was that the branches are independent of each other and when I change from one branch to another the changes do not "spill over" from one branch to another. So I am obviously missing some thing here. Anyone got a clue stick? |
I have a Clojure listing and I want to colour certain keywords whereas I can only do for strings not including any dash ('-') or slash ('/). But I also need to consider keywords consisting of with dash and etc as well. I have the following listing: \documentclass[english,a4paper,12pt]{report} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{listings} \usepackage{xcolor} \input{listingsClojure} \begin{document} \begin{lstlisting}[ basicstyle={\fontsize{9}{10}\ttfamily}, mathescape=true,showstringspaces=false, flexiblecolumns=true, tabsize=2, numbersep=1pt, numbers=left, xleftmargin=0.2cm, framerule=0pt,language=Clojure ] (defn NOAsp [?n1 ?n2] "the numbers" (l/all (w/asp ?n1) (equals ?n2 (.getSourceLocation ?n1)))) \end{lstlisting} \end{document} And my lstdefinelanguage Clojure file: \usepackage{soul} \usepackage{xcolor} \lstdefinelanguage{Clojure} { morekeywords={defn, equals,l,all,getSourceLocation,'w/asp'}, morestring=[b]", morestring=[b]', } \lstdefinelanguage{none} { keywords={}, alsoletter={+}, morekeywords={} } \newcommand{\fsize}{\fontsize{8pt}{0pt}\selectfont} \newcommand{\fsizesmall}{\fontsize{7.5pt}{0pt}\selectfont\ttfamily} \lstset{ basicstyle = \fsize, identifierstyle = \fsize, keywordstyle = \fsize\color[HTML]{71295b}, keywordstyle = [2]\fsize\bfseries \color[HTML]{859900}, commentstyle = \fsize\color[HTML]{839496}, stringstyle = \fsize\color[HTML]{2429c9}, lineskip={-2pt} } I would like to see 'l/all' and 'w/asp' and '.getSourceLocation' together in color. Now I only see the following keywords are coloured: 'l', 'all', 'defn' and 'getSourceLocation'. More clearly, the red blocks must be coloured together: | When using Perl variable names with sigils with listings, the $ and @ sigils somehow get coloured in identifierstyle, but the % sigil remains unstyled. Therefore, this code: \documentclass{article} \usepackage{listings,xcolor} \lstdefinestyle{perl}{ language=Perl, basicstyle=\ttfamily, keywordstyle=\bfseries\color{green!40!black}, commentstyle=\color{purple!40!black}, identifierstyle=\color{blue}, stringstyle=\color{orange}, } \lstset{style=perl} \begin{document} \begin{lstlisting} my ($a, $b, $c) = ('a'..'z'); my ($a, $b, @c) = ('a'..'z'); my ($a, $b, %c) = ('a'..'z'); \end{lstlisting} \end{document} gives this result: Is there a way I could make listings understand that % should have the same style as $ or @? The manual is pretty clear about keywords and comments, but it didn't help me understand the difference between an identifier and an operator (?) that doesn't get styled. Looking at the Perl language definition in lstlang1.sty didn't help either since there is nothing there about either $ and @ or %. |
We are looking for a way to auto download our Salesforce weekly export files to an internal server for long term storage. Has anyone successfully done this either custom, using a 3rd party tool or tools (or some combination of both)? | After a Data Export has completed there can be a large number of zip files to download. If there are 80+ files at 130 MB (In Summer 12 the limit has been increased to 512 MB) each and each file takes several minutes to download it can be a time consuming process to do manually. Is there a way to automate the retrieval of these zip files? |
This post has two parts: (a) a question and (b) a proposal. (a) Often, particularly while writing technical papers or user's manuals, I have come across a situation where I need to say: A user of this software may not need to use it from his personal computer. He can use it from a phone or even from his tablet. I have seen many authors use female pronouns (i.e. “she” and “her”), but lately this trend seems to have ebbed somewhat. I, and (I suspect) many other authors, do not want to use passive voice to avoid this. Is there a gender-neutral way to describe the same situation? (b) If there is none, I would like to propose using “ze” (for “he” or “she”) and “zir” (for “his” or “her”, rhyming with “fir”) as gender-neutral pronouns. I want to know how you feel about these words. | I know that one can use "they" / "them" / "their" in place of "he" / "him" / "his" or "she" / "her" / "hers" when the subject's / direct object's gender is not known; for instance, just looking at the default user's about me section on Stack Exchange sites: Apparently, this user prefers to keep an air of mystery about them My question is what happens when someone wants to reference the subject using a pronoun instead. Should the verb be conjugated accordingly to the pronoun? E.g.: Apparently, they prefer to keep an air of mystery about them Or should the conjugation be retained? E.g.: Apparently, they prefers to keep an air of mystery about them The former looks unclear because it wouldn't allow the reader / listener to understand if the writer / speaker is talking about a single person or about a group of people, however the latter sounds very weird, at least just to the non-native speaker which I am. |
OK in Skyrim I had a follower but then they disappeared. I've seen another question a lot like this but the answers to it did not help. I was wondering what quest would teleport me because one of the answers to that other question said that if I got a quest that teleported me automatically then my Follower would appear next to me. It was Mjoll the lioness. I went back to where I originally got her (at the Bee and Barb) and she was there but it says that i already have a follower but I don't. I was able to pickpocket my items from her but I still can't have a follower now. So to summarize what is a quest or quest chain that will teleport me so I can get my follower back? | I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears: Your follower tires of waiting and leaves. There have been other situations where my follower has mysteriously disappeared as well. How can I find my follower when they get up and leave or disappear into thin air? |
I have a desktop and a laptop that are stuck in Ubuntu 15.04 Any time I try to install or update any software, either through Software Centre, Package Manager or apt-get, it crashes out with a bunch of error messages once it starts trying to download files from the Ubuntu repositories. I've tried all different methods to try to manually upgrade the system files from version 15.04. But all updater or upgrader processes all crash once they start trying to download from the repositories. Nothing works to let me download the packages I need or upgrade the system. Any way I can fix it manually or do I need to get like a Ubuntu 18 installation CD and reinstall the whole system? | I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please? |
I am trying to count each character in strings. My function getting two strings. when I debugging my code I saw a very strange thing for me. Although the two characters are the same, the condition behaves as if they are not the same. my expectation is when they are the same to increase the value of lcounbir.You can see the below public class ContainStr { public static void main(String[] args){ System.out.println(containString("hostr1ell","ehllo")); } public static boolean containString(String str1,String str2){ int str2lenght=str2.length(); int str1lenght=str1.length(); int[] str1ar=new int[str2lenght]; String [] strbirar=new String[str1lenght]; String [] strikiar=new String[str2lenght]; // int vl=1; // int zerocounter=0; for(int i=0 ;i<str1lenght;i++){ strbirar[i]=String.valueOf(str1.charAt(i)); } for(int i=0 ;i<str2lenght;i++){ strikiar[i]=String.valueOf(str2.charAt(i)); } int lcounbir=0; int lcouniki=0; int contson=1; for (String letter:strikiar ) { for(int i=0;i<str2lenght;i++){ if(letter==strikiar[i]){ lcouniki+=1; } } for(int i=0;i<str1lenght;i++){ if(letter==strbirar[i]){ lcounbir+=1; } } if(lcounbir!=lcouniki){ contson=0; break; } } if (contson==0){ return false; } return true; } } | 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? |
My goal is to display source code (awk, Python, R and SAS) and text (their output) side-by-side. Both are loaded from external files, and can be pretty long sometimes (pagebreaking is inevitable), the source code should be syntax highlighted. The source code should stay on the left side, and the output should stay on the right side, even if there is a pagebreak. I'm using the listings package for its syntax highlighting. I can't find an environment to behave right when there's a pagebreak. Some of what I've tried already: multicols: this environment is fine, until there's a pagebreak (left side breaks to the right side and messes up everything) minipage: no pagebreak yet | In (La)TeX documentation and tutorials, it is common to show a snippet of code next to the output it generates. It might be two minipages side by side, or a code listing followed by boxed output, or whatever. For a trivial example, we might see \[ sin \theta \] next to its output, sin θ Whenever I've done this, I had to use two copies of the code, e.g., once inside verbatim and once inside a minipage or framed box). This just begs for inconsistencies and maintainability problems, since it's very easy to fix one copy and not the other. So, is there any way to display a bunch of code and to execute (a copy of) it, showing the results? I'm pretty sure it's not straightforward: the code needs to have different catcodes for reading and displaying, but catcodes get assigned only once, when the text is encountered. But if there's no better way, it should be doable by reading the code verbatim and saving a copy in the .aux file, from where it'll get read and interpreted the next time around. But I've never seen such a thing. Has anyone else here? |
I generate keys for my software as: Guid.NewGuid().ToString(); that returns something like: 15c6bd70-8d3c-42d0-bb24-40da6e08ed9d anyways everytime someone purchases a new software I generate a new key. can it be possible that I generate the same key twice? Everytime someone purchase the software I call the method: Guid.NewGuid().ToString() Should I append a counter at the end of each guid to be 100% sure that there cannot be duplicates? Edit A constructor of the Guid class takes a byte array of 16 bytes as a parameter. If you serialize the current date (8 bytes) then append another 8 random bytes to the constructor of the GUID will that be 100% secure? I am just asking for learning based on your answers I will probably just have Guid.NewGuid() | Is a GUID unique 100% of the time? Will it stay unique over multiple threads? |
I've had a few concerns over a new form of "spam" - that is, through voting. A while back, I had seen some wild reputation increases to my account, amongst others, that seemingly felt weird - as I've barely participated in asking questions or providing answers. Earlier today, this sentiment was echoed by another user in chat: and like 250 this month? it seems like someone is spam upvoting This was another user that saw a 250 rep increase, but has been inactive for quite a while. For a site that hasn't seen more than 5 questions a day, that was really weird. To put things even more out of hand, it seems like each vote has been placed on a question. I did some investigation of my own, and it seems like I've found a badge hunter. More of a... gold badge hunter. This user is among the top 3 voters of the site. Looking into this user's profile, this user only has under 200 rep, and has posted a single question, which was received differently. One thing caught my eye: Votes all time by type 581 up 535 question 1 down 47 answer Each vote is an up vote (with the exception of one), and there are 535 up votes on questions. There are 535 questions in the entire site. Using reputation stats from user profiles, I came with the conclusion that these votes are... Done within a short period of time. 5 question votes within a couple of minutes Done in [near] perfect chronological order: The earlier the vote, the earlier the question was asked. As if the user had gone through the list of questions in order, and placed an up vote on each one. I see this as incredibly problematic. First: It dangerously inflates reputation. Votes are not done based on their content, but simply for voting. Therefore, reputation loses it value as a way to measure expertise. It's like serial up voting. Generally, when we hear the term "serial up voting", we think of a voting ring, where one user continuously up votes another. This is negative for the targeted user. Well, here, we've got a voting ring with the site and this user. A user continuously up votes the site, causing negative damage for the site. We mix good and bad content. Since low quality questions are a victim of the voting spree, many get meddled with the rest of "good quality" questions, despite being closed as off-topic, too broad, or whatever the reason. We can no longer reliably sort questions by quality with the very system that was designed to help us. ... And the rest of voting fraud issues outlined in . I've got a couple questions on this: Is this comparable to serial voting? Should such votes be reversed? How should we determine whether or not to reverse them? Should we stop this? Let it be? Is this really that big of a problem for sites? (I would argue that it's less of an issue for graduated sites that receive large amounts of content, but what about beta sites that rarely see more than a few questions a day) | I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause. During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected". What does this mean, and what caused it? Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers? Is there any way to earn it back? |
In the formula $\Delta U = C_v\Delta T$, we get the constant volume heat capacity by assuming constant volume conditions. However, I've understood that a constant volume is not required when using the formula. I tried understanding the solution through several other posts but it still doesn't make sense to me. Unless my base knowledge is wrong (I have a hard time understanding thermodynamics), why are we allowed to use $\Delta U = C_v\Delta T$ when volume changes? | When we try to establish a relation between the pressure and temperature in adiabatic process we come across a equation.. $dU = dq - PdV$ $dq=0$ (Adiabatic process) and, $dU=C_v.dT$ (Heat capacity at constant volume) Therefore, $C_v.dT = -PdV$$\tag1$ In this equation we are using heat capacity defined at constant volume but their still is some work done by the system (i.e, $PdV$ is not $0$ or $dV$ not equals to $0$). The first part of the equation $(1)$ is implying that the volume is constant but the second part is implying that the volume is not constant (if it was there would be no work done). Then why there is this contradiction ? |
Is there a term used to refer to the following parts of these sentences (in bold): Look out for the car travelling at high speed. Catch me coming in hot. I'm not sure if these can be considered adjectival clauses or if there's a better terminology for it. | In a casual search of the web, I found a few indications English does not allow zero copulas (). However, I frequently see sentences with subordinate clauses that juxtapose a noun phrase with an adverb phrase, such as the following from a contemporary sci-fi author: Kai stares up at me from the grave, his eyes hard as obsidian. If this clause were made into a sentence, it would take an obligatory verb: *His eyes hard as obsidian. His eyes are hard as obsidian. The original clause seems to contain an implicit "to be." Is it an example of a zero copula? If not, what is this construction called? |
I'm writing a scientific text and need to use β as a character. However when I use \beta it changes the formatting of the rest of the paragraph to italics and removes spaces. Is there a way to stop this from happening? | After using the Pi symbol (\Pi), my text changes to a different font and goes to italic. How can I resolve this? |
I just started a project width a lot of colored pencils in it. As I want to have all of them have the same Material, but a different color, i came up with the question: Is there a way to create a single Material und assign different colors to meshes that all have this one material assigned? Or: Is it possible to link the materials of the pencils, so if I tweak one of them, the rest will have the changes applied, too? | I have to display several versions of the same object, with only the color changing. My first approach was to duplicate the mesh and add a different material to each. My problem is: when I want to modify the mesh, I have to do it on each object separately. I tried to have different objects with the same mesh, but the color seems to be linked to the mesh and not to the object. Is there a way (even programmatically) to have the same mesh in different objects with different colors? Additionnal info: I'm using Cycles and my material is a node material in which there is only one changing color. |
Could it damage an Ubuntu system when somebody runs an upgrade like apt-get dist-upgrade or a similar command and somebody else does an upgrade remote at the same time as well? | I'm pretty sure this is a duplicate somewhere. I apologize for the repeat. I'm running Xubuntu 14.04. For some odd reason my pc is running slow today, so I thought it might have something to do with the software, so I did an update, and sudo apt-get update returns an error: E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? I tried the answer given in and this is the following result: $ sudo lsof /var/lib/dpkg/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME aptitude 2166 root 3uW REG 252,0 0 49021509 /var/lib/dpkg/lock $ sudo lsof /var/lib/apt/lists/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. $ sudo lsof /var/cache/apt/archives/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. $ sudo dpkg --configure -a dpkg: error: dpkg status database is locked by another process How do I fix this? Could someone walk me thru the steps? Why would I need a "lock" on an open directory? How do I find what process is using it? How do I check my hardware if that's the culprit?? I will try a reboot, and see if that fixes anything. Be right back. OK, NOW after rebooting I get the following results:| $ sudo lsof /var/lib/dpkg/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. $ sudo lsof /var/lib/apt/lists/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. $ sudo lsof /var/cache/apt/archives/lock lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output information may be incomplete. lsof: status error on /var/cache/apt/archives/lock: No such file or directory lsof 4.86 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-f[gG]] [+|-e s] [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s] [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names] Use the ``-h'' option to get more help information. I also tried sudo dpkg --configure -a which may have worked cause when I did sudo apt-get update I got NO ERRORS. |
Scenario: A PC has become Large through means of Enlarge Person. All of the gear he carries has been Enlarged with him as per spell. A Large Greatsword lies on the ground nearby and he goes and picks it up. Does the greatsword: A: Remain Large allowing the PC to wield it just as the equipment enlarged with him? Follow up: What happens when the PC returns to their original size? Can a Medium PC then carry around a Large weapon on their back, drop it before Enlarge Person is cast, then pick it up and wield it? B: Enlarge by one size into a Huge Greatsword as soon as it is picked up by the Enlarged PC C: do something I haven't thought of....? | The rules for and say "All equipment worn or carried by a creature is similarly [reduced or enlarged] by the spell." Does that happen once at the beginning of the spell for the duration of the spell or do other things picked up later also change in size? Which one of the two is it, and wouldn't the latter have really strange consequences, such as if you pick up a friend all their equipment (but not the friend itself) would become while you carry it/him? Inspired by this . |
I have been looking for a small connector that I can use for Ethernet 10/100 base communication. There were some similar discussions here about the same topic, but I couldn't find a solid answer. In my application, I don't want to use an RJ45 connector because of the form factor. I looked at some industrial connectors like "Industrial Mini IO" from TE, but the problem with those is now I have to deal with a big back shell for the cable itself although the connector helps with making the product smaller. I was wondering has anyone used an RJ12 for a 10/100 base Ethernet application? That's currently one of the options I'm looking at and I'm not sure if it is the correct way. If RJ12 is not a good option, does anyone know any small connector that I can use which also doesn't need a big back shell for the mating cable? | I'm designing a small board that needs an ethernet connection. However, the RJ45 jack takes considerable space. I would like to reduce the footprint of the connector to safe some space. Would it be possible to replace it by a (non-standard) smaller connector, like a micro usb connector or a JST PH connector? Which connectors would be suitable and why (or why not)? |
Reading about AKS primality test I've encountered the expression $(x+1)^n \equiv x^n+1 \mod{(n, x^r-1)}$. What does the notation $x\equiv y\mod{(r,s)}$ mean in general? Is it simply $x \equiv y \pmod r\pmod s$? | Where does a layman go to get a basic understanding of AKS primality testing. I am not talking about the optimal choice of $r$ (which I am told is the hardcore number-theoretic part of the algorithm). I mean basic things, like what does $\bmod(n, x^r-1)$ mean (how can something be mod two things?) And what does binomial expansion have to do with anything? I can't find anything in Wikipedia that is appropriate for my level. |
How do I discover which application installed these programs? /usr/lib/tracker/tracker-store, tracker-extract, tracker-miner-fs It's eating up all my resources. The CPU, one or two of them anyway, is well over 100% usage, The memory is very loaded, system load is over 50%, and disk read/write is very busy. The man pages tell me it's a data miner set of programs for files on my system only. htop tells me I am the owner. Yesterday I installed some programs, all from the software center, with one exception: Enthought Canopy, it's a Python IDE. How do I discover which application installed these programs? | 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? |
Posts’ and comments’ minimum length validations are being bypassed by the U+2800 BRAILLE PATTERN BLANK Unicode character "⠀". It counts as an "Other Symbol", not as whitespace or a control character. For example, see the comment beneath this post. This needs to be fixed. | If you comment something on Stack Overflow, you need to enter at least 15 characters, and you can't post a comment which just contain spaces. But if you type in zero-width spaces it will work. A zero-width space can be translated with &#8203; in HTML. For better understanding, I have added a zero-width space comment to my question. |
I know that several people have raised this issue before, but I am not sure why this has happened to me. I have not asked many questions on SO, but whenever I have, I've worded them clearly, and if any more detail was needed, I obliged and provided more clarity. Furthermore, when I did respond to a problem, I was clear and detailed. The only times that I was down voted significantly was on May 11th, 2013 and January 20th, 2014. On both occasions, either my question or my response to my own question got voted back up; In the first case, I ended up with a positive net vote. Given these details, why have I been banned? More over, I really don't know what to do to eradicate the ban; I can't add new questions of "high quality" to improve my reputation, as I have been banned. I can't really improve my previous posts anymore, as they have been clearly worded and explained, with code in most cases. I really rely on SO to figure things out, so any solutions to my problem would be appreciated. Thank you. | If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see: We are no longer accepting questions from this account. See to learn more. Likewise, for answers: We are no longer accepting answers from this account. See to learn more. Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked? |
i've a question about my code. this is my code Map <String, hewan> hwn = new HashMap<String,hewan>(); for (int j = 1 ; j<=bacaInginHewan; j++){ hewan hewan = new hewan(); String [] bacaJumlah =br.readLine().split(" "); namaHewan=bacaJumlah[0]; ingin = Integer.parseInt(bacaJumlah[1]); if (hwn.containsKey(namaHewan)){ if (hwn.get(namaHewan).jenisOperasi.equals("vivipar")){ int jumlahAwal = hwn.get(namaHewan).jumlah; int batasAkhir = ingin + jumlahAwal ; hewan.setIngin(batasAkhir); hewan.recvivipar(jumlahAwal); System.out.println("butuh "+hewan.getIterasiVivi()+" siklus untuk "+batasAkhir+" "+namaHewan); hewan.setJumlah(batasAkhir); hwn.put(namaHewan, hewan); } else if (hwn.get(namaHewan).jenisOperasi.equals("ovipar")){ int jumlahAwal = hwn.get(namaHewan).jumlah; int batasAkhir = ingin + jumlahAwal ; hewan.setIngin(batasAkhir); hewan.recOvipar(jumlahAwal); System.out.println("butuh "+hewan.getIterasiVivi()+" siklus untuk "+batasAkhir+" "+namaHewan); hewan.setJumlah(batasAkhir); hwn.put(namaHewan, hewan); } My question is, why did it turn null pointer for second loop with same namaHewan in this if clause. thanks for the explanation if (hwn.get(namaHewan).jenisOperasi.equals("vivipar")) | 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? |
Let $X,Y$ be two topological spaces and $f:X \rightarrow Y$. Prove that $f$ is continuous on $X$ iff $int(f(A)) \subset f(intA)$. My attempt: ($\Rightarrow$) Assume that $y \in int(f(A))$. I tried to prove $y \in f(int(A))$. We have $V$ is an open set : $y \in V \subset f(A)$. So there is an $x \in A$: $y=f(x)$. Because of the continuity of $f$, there is an open set $U$ containing $x$ and $f(U) \subset V$. It leads to $f(U) \subset f(A)$, but I'm not sure $x \in U \subset A$. I wonder if we have $f$ is injective then can I say $f(U) \subset f(A)$ then $U \subset A$ ? ($\Leftarrow$) I have already known the solution. Is there any solution for this ? Thank you. | I've managed to show that the following are equivalent (where $f^*$ and $f_*$ are the preimage and image of f respectively): $\bullet$ $f:X \rightarrow Y$ is continuous $\bullet$ $f^*(S^{\circ}) \subseteq f^*(S)^{\circ}$ $\bullet$ $\overline{f^*(S)} \subseteq f^*(\overline{S})$ $\bullet$ $f_*(\overline{S}) \subseteq \overline{f_*(S)}$ Is the following also equivalent: $f_*(S)^\circ \subseteq f_*(S^\circ)$ (or something similar)? I've not managed to get very far, although my proof of condition 3 hinged on the fact that preimages, complements, interiors and closures all behave well together, whereas this is not case for the image of a function, so I feel this may not be true. |
I am currently using a Wacom tablet (CTH-480) on Ubuntu 13.10. This is possible because of the solution suggested here: I would now like to upgrade to Ubuntu 14.04. But before I want to be sure that my tablet will still be supported. Can anyone tell me whether my tablet will still work? | My Wacom tablet (CTH-480) is not detected by the Wacom Tablet option under settings. The Tablet shows up when I run lsusb but does not show up under settings. Again Thanks. |
My question is very simple: why we choose normal as the distribution that error term follows in the assumption of linear regression? Why we don't choose others like uniform, t or whatever? | As an assumption of linear regression, the normality of the distribution of the error is sometimes wrongly "extended" or interpreted as the need for normality of the y or x. Is it possible to construct a scenario/dataset that where the X and Y are non-normal but the error term is and therefore the obtained linear regression estimates are valid? |
I want to use the block environment together with the column environment in a beamer document. The margin/spacing is getting wrong/ugly in this combination. I want that the blocks are exactly as wide as a normal text would occupy (so that the text margins are still correct). \documentclass{beamer} \setbeamersize{text margin left=5mm} \setbeamersize{text margin right=5mm} \setbeamercolor{block title}{fg=white,bg=red} \setbeamercolor{block body}{fg=black,bg=gray} \setbeamercolor{background canvas}{bg=yellow} \begin{document} % Frame 1 ----------------------- \begin{frame} \frametitle{No Column Environment} \begin{block}{Block Title} Block Text. \end{block} \end{frame} % Frame 2 ----------------------- \begin{frame} \frametitle{Column Environment -- Only Left Block Environment} \begin{columns} \column{.50\textwidth} \begin{block}{Block Title} Block Text. \end{block} \column{.50\textwidth} \color{blue}\vrule width\textwidth height\textwidth \end{columns} \end{frame} % Frame 3 ----------------------- \begin{frame} \frametitle{Column Environment -- Left and Right Block Environment} \begin{columns} \column{.50\textwidth} \begin{block}{Block Title} Block Text. \end{block} \column{.50\textwidth} \begin{block}{Block Title} Block Text. \end{block} \end{columns} \end{frame} % Frame 4 ----------------------- \begin{frame} \frametitle{Column Environment Only} \begin{columns} \column{.50\textwidth} \color{blue}\vrule width\textwidth height\textwidth \column{.50\textwidth} \color{blue}\vrule width\textwidth height\textwidth \end{columns} \end{frame} \end{document} The reason for the yellow background is, so that it is clear where the page has its borders. Trying the idea from in one of the comments leads to. \begin{frame} \begin{columns}[onlytextwidth] \begin{column}{.45\textwidth} \begin{block}{Block Title} Block Text. \end{block}% \end{column} \hfill% \begin{column}{.45\textwidth} \begin{block}{Block Title} Block Text. \end{block} \end{column} \end{columns} \begin{block}{Block Title} Block Text. \end{block} \end{frame} Bug?! I Opened an Issue on GitHub I opened an issue on github: Update [2020-02-17]: The issue was closed on 22 Aug 2017 :). Similar or Duplicate or Related . | On a slide with two blocks aligned using columns, the spacing on the left and the right is not equal, ie the pair of columns in not centered on the page as in this example. I've tried enclosing the columns in \begin{centering} but that doesn't seem to work. How can I make the pair of columns centered? % Preview source code %% LyX 2.0.3 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{beamer} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. % this default might be overridden by plain title style \newcommand\makebeamertitle{\frame{\maketitle}}% \AtBeginDocument{ \let\origtableofcontents=\tableofcontents \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}} \def\gobbletableofcontents#1{\origtableofcontents} } \long\def\lyxframe#1{\@lyxframe#1\@lyxframestop}% \def\@lyxframe{\@ifnextchar<{\@@lyxframe}{\@@lyxframe<*>}}% \def\@@lyxframe<#1>{\@ifnextchar[{\@@@lyxframe<#1>}{\@@@lyxframe<#1>[]}} \def\@@@lyxframe<#1>[{\@ifnextchar<{\@@@@@lyxframe<#1>[}{\@@@@lyxframe<#1>[<*>][}} \def\@@@@@lyxframe<#1>[#2]{\@ifnextchar[{\@@@@lyxframe<#1>[#2]}{\@@@@lyxframe<#1>[#2][]}} \long\def\@@@@lyxframe<#1>[#2][#3]#4\@lyxframestop#5\lyxframeend{% \frame<#1>[#2][#3]{\frametitle{#4}#5}} \newenvironment{topcolumns}{\begin{columns}[t]}{\end{columns}} \def\lyxframeend{} % In case there is a superfluous frame end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \setbeamertemplate{blocks}[shadow=false] \beamertemplatenavigationsymbolsempty \usecolortheme{rose} \useinnertheme{circles} \makeatother \usepackage{babel} \begin{document} \lyxframeend{}\lyxframe{My slide} \begin{center} \begin{topcolumns}%{} \noindent \column{0.5\textwidth} \begin{exampleblock} {A short list\inputencoding{latin1}{\phantom{g}}\inputencoding{latin9}} \begin{itemize} \item Item 1 \item Item 2 \item Item 3 \end{itemize} \end{exampleblock} \column{0.5\textwidth} \begin{exampleblock} {A long list} \begin{itemize} \item Item 1 \item Item 2 \item Item 3 \item Item 4 \item Item 5 \item Item 6 \end{itemize} \end{exampleblock} \end{topcolumns}%{} \end{center} \lyxframeend{} \end{document} |
I have problems fully understanding the concept of work, so please forgive me if this is simple. If I take a box of mass $ m $, and lift it a distance $ d $ vertically, why is the work I have done equal to $ gmd $, where $ g $ is the force gravity exerts on the box? I understand that work is equal to force times distance--so I'm not asking about the definition of work--but if I exert an upward force equal in magnitude to gravity's, won't the box remain motionless, i.e., net zero force, in which case the velocity is constant, and displacement and work done will be equal to zero? Edit: To be clear, what I'm asking is not a duplicate of "Why does holding something up cost energy while no work is being done?", because I'm not asking about work done on an object with zero displacement, nor is it a duplicate of "What exactly is F in W=∫baFdx?", because I'm not asking about the distinction between the work done by an individual force and net force. | I am trying to teach myself some basic physics, here is something I do not really understand about the definition of : When moving from $a$ to $b$ (in one dimension), the work done is defined to be $$ W = \int_{a}^{b} F dx $$ Now, say, I lift something up from the floor to a table covering a distance $h$. The work done is supposed to be $mgh$. This result is obtained by setting $F = mg$ in the equation above, which is the force exerted by gravity on the object. However, gravity is not the only force acting upon the object. What about the force used by me to lift the object, why does it not enter the equation? |
I was playing Mardek on kongregate.com using Google chrome, and decided to move to a different site. So I went to check my flash app data folder and the chat.kongregate doesn't have my save information? I tried to clear out the folder and see if it was still there, and my save still worked on the site, but I have no idea where it is! I even cleared the entire app data folder looking for it and it still worked! | I am currently playing a flash-game (Mardek RPG chapter 3) and I found it pretty long. I've done quite a lot of progress on a computer that's not mine (it belongs to my relatives), and now I want to continue playing this session on my computer. I'm playing it off-line, so the saved data is on the computer. Is it possible to transfer the saved data to my own computer? If so, how can it be done? |
I am having a problem getting the results back from a WMSGetFeatureInfo call to my GeoServer. Using OpenLayers 2.12, GeoServer 2.4.0, Windows Server2008, and Microsoft IIS 7.5 with Application Request Routing Cache and URL Rewrite. I do NOT use a proxy because I use URL Rewrite. The URL Rewrite takes my incoming requests and formats them to avoid the cross domain/same origin problem. I have been successfully querying WFS data using this setup for 2 years but when I try to use the WMSGetFeatureInfo it fails. Here is my process: I serve multiple WMS layers from GeoServer to my web page. The user selects a WMS layer from a dropdown. This sets the variable "selLayer" so my WMSGetFeatureInfo call is pointing at the layer the user wants to get information about. When the user clicks on the layer it fires this code which creates a OpenLayers WMSGetFeatureInfo control with an event listener that should accept the return text & xmlHttp request and display them in a div. : var infoControl = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://xx.xx.xx.xx:8080/geoserver/wms', title: 'Identify features by clicking', layers: [selLayer], queryVisible: true, //eventListeners: { getfeatureinfo: function (event) { alert("TEXT: " + event.text + ", XY: " + event.xy + ", REQUEST" + event.request + ", FEATURES: " + event.features); } } eventListeners: { getfeatureinfo: function (event) { document.getElementById("divAttributes").innerHTML = event.text + "Test Text"; alert("PUT TEXT HERE!!!"); } } }); map.addControl(infoControl); infoControl.activate(); But, when the script runs I do not get return values for the event.text. When I run this in FireFox (with FireBug) I can copy the GetFeatureInfo request into a new browser window and I get the desired return values. So my question is: Why am I not getting the return values when I run this on my map webpage but I do get results by posting the request into a new browser window. | I hope somebody has already figured this one out. I just installed Geoserver 2.9 on a vanilla Ubuntu 16.04 distro. The Geoserver 2.8 method of enabling CORS with the shanbe.hezoun class does no longer work with Jetty 9.2.13. There are mentions that CORS support is already packaged with Jetty 9.2.13 in the jetty-servlets.jar. The Jetty lib which is compiled with Geoserver contains a jetty-servlet-9.2.13.v20150730.jar in geoserver/lib but not jetty-servlets.9.2.13.v20150730.jar. Are these supposed to be the same jar with a different name? It should be possible to enable CORS either in geoserver/etc/webdefault.xml or in geoserver/webapps/geoserver/WEB-INF/web.xml. My understanding is that the webdefault.xml is applied first and the web.xml thereafter. I have tried following filter in both xml. I haven't got as far as adding a filter mapping. Adding the filter alone will cause the Geoserver/Jetty service to not start proper. <filter> <filter-name>cross-origin</filter-name> <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class> </filter> |
My teacher told me that Vectors are quantities that behave like Displacements. Seen this way, the triangle law of vector addition simply means that to reach point C from point A, going from A to B & then to C is equivalent to going from A to C directly. But what is the meaning of a product of vectors? I cannot imagine how a product of displacements would look like in reality. Also, how do we know whether we need the scalar (dot) product or a vector (cross) product? | I get the physical significance of vector addition & subtraction. But I don't understand what do dot & cross products mean? More specifically, Why is it that dot product of vectors $\vec{A}$ and $\vec{B}$ is defined as $AB\cos\theta$? Why is it that cross product of vectors $\vec{A}$ and $\vec{B}$ is defined as $AB\sin\theta$, times a unit vector determined from the right-hand rule? To me, both these formulae seem to be arbitrarily defined (although, I know that it definitely wouldn't be the case). If the cross product could be defined arbitrarily, why can't we define division of vectors? What's wrong with that? Why can't vectors be divided? |
Its heard from century that iphone has bluetooth,but why we cant share anything over bluetooth,but infact we can connect bluetooth speaker and play some music. | I googled a lot and read many documents. But I can't understand the concept behind iPhone's Bluetooth technology. In my knowledge, Bluetooth was used for: Transferring files between devices Wireless communication for things like video gaming and earphones Recently I tried to copy some of the photos from my old Android mobile to my iPhone 4S via Bluetooth. It's quite simple in my older phones to connect with other devices by Bluetooth for file sharing. But I can't pair other devices (even another iPhone :( ) with my iPhone 4S. Copying songs/videos may affect their iTunes as well as their business. But what about images? Why is the usage of Bluetooth restricted and what's the use of it being able to transfer images? Is there any other way to use iPhone's Bluetooth to transfer files? Maybe using an app? But I don't want to jailbreak my device. I'm confused about the restrictions and Apple's thinking. |
I discovered this sentence: Many a traveler has found the whole pub experience rather bewildering. The meaning is clear to me. But the phrase "Many a traveler" seems to be a bit odd to me. Can you explain it to me? | so soon they were all seated at Beorn's table, and half had not seen such a gathering for many a year. Why is many a year used? Should not many years be used? What is the difference between many a year and many years? |
Is there any way to be able to catch all exceptions when doing string matching? For example if I have a string, print("red" =="red" ) # evaluates to True However, print("Rεժ" == "red") # evaluates to False What I would like is to be able to catch all the special cases such as the following print("Rεժ" == "red") print("RêÐ" == "red") to be evaluated to be True. The use-case for this is to be able to have some sort of text filtering to be able to catch all the words "red". | I have a Unicode string in Python, and I would like to remove all the accents (diacritics). I found on the web an elegant way to do this (in Java): convert the Unicode string to its long normalized form (with a separate character for letters and diacritics) remove all the characters whose Unicode type is "diacritic". Do I need to install a library such as pyICU or is this possible with just the Python standard library? And what about python 3? Important note: I would like to avoid code with an explicit mapping from accented characters to their non-accented counterpart. |
Is there any way to cycle between Mission Control (⌃+↑) windows with the keyboard? I'm referring first and foremost to moving between the windows shown in the bird's eye view, see image. Either native or 3rd-party solutions are most welcomed. Thank you. | Does Apple have keyboard shortcuts to switch between applications in Mission Control? (Instead of hovering over with the cursor)? e.g., which key combination cal I press to get me from "preview" to "app store?" |
It is not a commonly used word. It's not a medical condition, but it's a noun that describes a person or the condition of a person who abuses when he is angry and calms down. I think it starts with an m. | Is there a word which has this definition: usage of vulgar or abusive words too often especially while chatting or talking to someone or while giving a speech. What do you call a person who uses abusive words too often without needing to. |
The gardens stretched back to some reasonable-looking pasture land on which grazed a few cattle and sheep. Why is this inversion valid here? I would expect maybe "on which there grazed" (as in "there comes a time") if an inversion were to be happen. | The opening sentence to The Hobbit by J.R.R. Tolkien reads, In a hole in the ground there lived [verb] a hobbit [subject]. I wonder if there are accepted stylistic purposes for such a structure. When is it natural, and when is it unnatural? |
now that there are past a few months. I do have the same Problem. I have an Dell Inspiron 17 5770 2018, Core i7-8550U, 16GB RAM, 2TB HDD, 256GB SSD (5770-0371) and it has a graphicscard AMD Radeon 530, 4GB, HDMI. I tried installing the driver on Ubuntu 16.04 and 18.04 . None of them is working. Is there a solution? | I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL. I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI. Is there anything I can do to get my AMD card working to its full potential? |
I'm playing The Walking Dead and I'm trying to figure out if there are different endings and who will stay with me until the end of the game. Does gaining reputation help you in the game? | I just finished Episode 5 and wondered, if there were alternative endings or game branches. I brought the whole group with me, and am wondering what would have changed if different people accompined me, and if the episode is possible to play out differenly. On my playthrough, Lee killed the stranger, and on the run back to Christa and Omid, was to weak to continue. Clementine shot him. Kenny died along with Ben after he fell off the building. And Lee was cut off Christa and Omid after they went over the "bridge" first. |
I have recently installed ubuntu 14.04 (and before that I had the same problem with 12.04) on a Dell inspiron 9400 Intel Core 2 Duo T7200. But when I am trying to type something the keys do sometimes not respond at all or the letter is repeated a lot in one short keystroke. for example: when typing "Hello" this can happen: " Hlllllllllllllo" The E in hello did not show up, and the second l repeated a couple of times. This didn't happen when I used a live usb boot. Does somebody have the solution for my problem, because it makes the computer almost unusable. Thanks in advance | This is one of the wackiest and weirdest problems I have ever encountered. My keyboard was working absolutely fine untill yesterday on Ubuntu 13.04. However, when I boot to Ubuntu today, I suddenly find that all the keys work, but I have to press and keep on holding them for about a second for them to work. This behavior is true for all the keys except for Num Lock, Caps Lock and Scroll Lock keys, the indicator for them on my keyboard lights up as soon as I press those keys. The keyboard works fine at the login screen where I put my password. The keyboard also works normally if I use the Guest session instead of my normal user account. I have not done any key-remappings and using the standard English (US) keyboard layout. I have fiddled around with the settings for Keyboard in System Settings, but to no avail. I have Windows 7 as dual-boot and the keyboard works perfectly well on it. Why am I facing such a behavior and how to normalize this? PS: Using Logitech Classic Keyboard K100 (USB Model). |
Today i encountered some weird behaviour (lines with off angles and wrong lengths) while creating graphics with TikZ/PGF. After some searching i have narrowed down the problem to the example shown below: Here i am trying to create a line of length 10 that starts at (0/0) and has a 30° slope using polar coordinates. \documentclass[11pt]{scrreprt} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \begin{document} \begin{figure}[h] \begin{tikzpicture} \begin{axis} [ axis lines=center, xlabel={$x$}, ylabel={$y$}, ymin=-1.5, ymax=15.5, xmin=-1.5, xmax=20.5, grid=major ] \draw [blue] (0,0) -- ++(30:10); \draw [green] (0,0) -- (30:10); \draw (0,0) circle [radius=10]; \end{axis} \end{tikzpicture} \end{figure} \end{document} To my mind, the blue and the green line should be identical, but for some reason that i cannot explain, they are not. Here is how i understand it: The only difference between the two commands \draw [blue] (0,0) -- ++(30:10); \draw [green] (0,0) -- (30:10); is that the first uses relative coordinates and the second does not. But since the first command uses the last part of the path as its point of reference (0/0) and the second command uses the origin of the coordinate system as its point of reference (0/0) [TikZ/PGF manual, section 13.2.1] there should be no difference. Since my prediction of what should happen does not match with reality, obviously i am missing something. I would be glad if somebody could give me a hint as to what it is that i don't understand here. Thanks. | I would like to annotate a patch plot with lines whose start and end points are given in absolute polar and relative polar coordinates, respectively. The patch plot, based on cartesian data, comes out as a circular shape centred around the origin (0,0) and shall be simulated here by a plain circle. Lines should start at the circumference of the shape and point away from the shape under a given angle and have a well defined length. Therefore, the use of relative polar coordinates for the line's end point. What seems to be straightforward with TikZ (left) fails inside the axis environment of pgfplots (right): neither the inclination angle nor the length of the line are correct if relative polar coordinates are used. What is wrong with the rel. polar coordinates here? The code: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \begin{tikzpicture} \draw(0,0) circle[radius=0.01]; \draw[blue] (0,0) circle[radius=1]; \draw[thick] (45:1) -- ++(45:0.5); \end{tikzpicture} \begin{tikzpicture} \begin{axis}[tiny,enlargelimits, axis equal, xmin=-2,xmax=2, ymin=-1,ymax=1, xtick={-2,-1,0,1,2}, ytick={-2,-1,0,1,2}, grid=major, ] \draw[blue] (0,0) circle[radius=1]; \draw[blue, dashdotted] (0,0) -- (45:2); \draw[thick] (45:1) -- ++(45:0.5); % \draw[thick] (45:1) -- (45:1.5); %absolute coordinates do work \end{axis} \end{tikzpicture} \end{document} |
I am trying to put a label over the transparent plastic bottle, but i was unable to do so, because when i build the bottle material(plastic) and mix it with the diffuse shader(using the label texture), the label gets faded. So the solution i found was to duplicate the bottle and scale a little bit and apply the label material on it. So it looks its the same material, but in reality its one material over the other. How can I make my plastic material be under my label material(image)? Here's how it looks: Here's my material setting for the plastic bottle: Thanks in advance. | I added two planes in Cycles with Image Texture in png with some transparency. I covered one by the other but transparency doesn't work, I mean it is impossible to see the one which is under despite transparency in the one which is above. What could be the problem? |
Exercise 3.5.1 in Gathmann's lecture notes: Let $L_1$ and $L_2$ be two disjoint lines in $\mathbb{P}^3$, and let $P\in \mathbb{P}^3 \setminus (L_1 \cup L_2)$ be a point. Show that there is a unique line L meeting $L_1$, $L_2$, and $P$ (i. e. such that $P \in L$ and $L \cap L_i \neq \emptyset$ for $i=1,2$. And is it true that a line in $\mathbb{P}^3$ is given by a system of two homegeneous linear equations? | I'm a bit stuck with this exercise from a script I'm reading, and I'm not very familiar with projective $n$-space yet. The problem: Let $L_1$ and $L_2$ be two disjoint lines in $\mathbb{P}^3$, and let $p\in\mathbb{P}^3\smallsetminus(L_1\cup L_2)$. Show that there is a unique line $L\subseteq\mathbb{P}^3$ meeting $L_1$, $L_2$, and $p$ (i.e. such that $p\in L$ and $L\cap L_i\neq\varnothing$ for $i=1,2$). To be honest, I already have a problem with the term 'line'. As I take it, a line in $\mathbb{P}^3$ should be something cut out by two degree-1 polynomials (homogeneous, since it wouldn't be well defined otherwise, right?). But what are disjoint lines in projective space? As far as I understood it, two distinct lines should always intersect in exactly one point there, so how can they be disjoint? Can it be that these two statements mean a different kind of 'line'? Any explanation of this, hints, or even a solution would be very appreciated. Thanks in advance! |
What is the difference between --no-dereference (-P) and -d options for the cp command? I know -d is the same as if both --no-dereference and --preserve=links were specified but what exactly does --preserve=links do? Should I use -d or -P? | I'm trying to understand what cp --preserve=links does when used by itself, from my tests it seems that it copies a normal file normally and dereferences symlinks, but it seems like it just has the same effect as cp -L when used on a single file. Is that true or is there something I'm missing? |
Let $\{a_n\}$ be defined by $a_1 =1 $ and $a_{n+1} = 1 + {\dfrac{1}{a_n}}$ with $n \in N$. Show that $a_{n+1}= 1 + {\dfrac{1}{a_n}}$ converges. I know the limit but how can I show that is a Cauchy sequence or that this sequence converges. | I will post the exercise below: Prove that the sequence $(a_n)$ defined by $a_0 = 1$, $a_{n+1} = 1 + \frac 1{a_n}$ for $n \in \mathbb N$ is convergent in $\mathbb R$ with the Euclidean metric, and determine afterwards is limit. Can you intepret the limit geometrically (hint: Golden ratio)? So I need to prove that the sequence is convergent in $\mathbb{R}$ with the Euclidean metric, and how do I prove that? The limit must be $1$, but how to interpret it geometrically? |
I have some trouble in understanding the definition of absoluteness.Let $M$ be a (transitive) model of $ZFC$. A formula $\phi(x)$ is said to be absolute if $\forall x \in M (\phi(x)^M\leftrightarrow \phi(x)^V)$, where $V$ is the Von Neumann universe. I know that it is in general possible to have $\phi(x)^M$ true but $\phi(x)^V$ false. For example $card(x)^M$ can be true (i.e. $x$ is a cardinal number inside the model $M$ but since when we are inside $V$ we add bijections because we are in a bigger class, so maybe x will be in bijection with something smaller than him so he will not be a cardinal number anymore. But is it possible that we have that $\phi(x)^V$ holds but $\phi(x)^M$ doesn't hold? Second, I was told that "being an uncountable ordinal" is not absolute. So what would be a model where that would be an example for this? | Jech in his "Set Theory" states without elaboration that cardinal concepts are not absolute generally. I think this is problematic. Any thought? |
I cannot access the C drive or launch apps that requires admin permission on my Windows 8, because I've changed C drive admin or user permission to full deny. I've tried many methods but it didn't work. Can I do it from Ubuntu? | I have a script that I need to execute on an NTFS partition. The script's permission is set to 600. I attempted to modify the permissions by running chmod 755 script.sh, which doesn't report a failure or anything - but it also doesn't change the permissions on the file: $ stat script.sh File: `script.sh' Size: 297070 Blocks: 584 IO Block: 4096 regular file Device: 811h/2065d Inode: 35515 Links: 1 Access: (0600/-rw-------) Uid: ( 1000/ xxxxxx) Gid: ( 1000/ xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700 $ chmod 755 script.sh $ stat script.sh File: `script.sh' Size: 297070 Blocks: 584 IO Block: 4096 regular file Device: 811h/2065d Inode: 35515 Links: 1 Access: (0600/-rw-------) Uid: ( 1000/ xxxxxx) Gid: ( 1000/ xxxxxx) Access: 2010-09-30 14:05:16.041621000 -0700 Modify: 2010-09-30 14:05:05.070157000 -0700 Change: 2010-09-30 14:05:05.070475000 -0700 As you can see, it remains unchanged. |
This seems so simple, but I cannot figure out what's wrong. I'm implementing the C++ vector class (only for int, not a template), and functions with iterator templates or typedefs are giving me these errors on compile: Undefined symbols: "void vectorInt::assign<int>(int, int)", referenced from: _main in ccNVdR23.o "void vectorInt::assign<int*>(int*, int*)", referenced from: _main in ccNVdR23.o _main in ccNVdR23.o ld: symbol(s) not found collect2: ld returned 1 exit status Important parts for the source files are: vectorInt.h #include <cstdlib> #include <stdexcept> typedef unsigned int size_type; class vectorInt { private: int* array; size_type current_size; size_type current_capacity; public: . . . template <class InputIterator> void assign(InputIterator first, InputIterator last); void assign(size_type n, const int u); }; #endif // VECTORINT_H vectorInt.cpp #include vectorInt.h . . . template <class InputIterator> void vectorInt::assign(InputIterator first, InputIterator last) { clear(); InputIterator it = first; int count = 0; while(it++ != last) { count++; } reserve(count); while(first != last) { this->push_back(*first++); } } void vectorInt::assign(size_type n, const int u) { clear(); reserve(n); for(int i=0; i<(int)n; i++) push_back(u); } main.cpp #include <cstdlib> #include <stdexcept> #include <iostream> #include "vectorInt.h" using namespace std; int main(int argc, char** argv) { vectorInt first; vectorInt second; vectorInt third; first.assign(7, 100); vectorInt::iterator it; it = first.begin()+1; second.assign(it, first.end()-1); // the 5 central values of first int myints[] = {1776,7,4}; third.assign(myints, myints+3); // assigning from array. return 0; } FYI: I know the main method uses the vectorInt::iterator, but that is not the problem and hence I didn't include it in the source code. | Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.) |
public class EqualsCheck { /** * @param args */ public static void main(String[] args) { Scanner sc= new Scanner(System.in); Scanner sc1= new Scanner(System.in); String s1 = sc.next(); String s2 = sc1.next(); equalCheck(s1,s2); } private static void equalCheck(String s1, String s2) { //Using Assignment System.out.println(s1 == s2); //Using equals System.out.println(s1.equals(s2)); //Printing HashCode System.out.println("s1 :"+s1.hashCode()+" s2: "+s2.hashCode()); } } Passed string are : s1 = "abc"; s2 = "abc"; If I do a s1==s2, it returns false. Why string pooling doesn't work here. | 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? |
Given that I intent to change files with extensive name of .md to .sh $ ls bath.md breakfast.md brush.md test.sh I wrote it as $ cat test.sh #! /usr/local/bin/bash for f in * do if $f endswith .md replace $f.md with $f.sh done How could I get the script done? | I would like to change a file extension from *.txt to *.text. I tried using the basename command, but I'm having trouble on changing more than one file. Here's my code: files=`ls -1 *.txt` for x in $files do mv $x "`basename $files .txt`.text" done I'm getting this error: basename: too many arguments Try basename --help' for more information |
Resouce id is showing error and i dont know what wrong i have done this is main java file the line myWebView = (WebView) findViewById(R.id.webView); is showing error and if i changed the id to something else app is crashing in emulator and also in physical device and its not about null pointer the user marked it as a duplicate i would request u to please improve your knowledge(no offence) package com.piyush.gangatechnicalcampus; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; public class MainActivity extends AppCompatActivity { private WebView myWebView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); myWebView = (WebView) findViewById(R.id.webView); WebSettings webSettings = myWebView.getSettings(); webSettings.setJavaScriptEnabled(true); myWebView.loadUrl("http://www.easyonlineconverter.com"); myWebView.setWebViewClient(new WebViewClient()); } @Override public void onBackPressed() { if (myWebView.canGoBack()) { myWebView.goBack(); } else { super.onBackPressed(); } } } here is the activity_main.xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activity_main" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.piyush.gangatechnicalcampus.MainActivity"> <WebView android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentStart="true" > <WebView android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_alignParentTop="true" android:layout_alignParentStart="true" tools:ignore="ObsoleteLayoutParam" /> </WebView> </RelativeLayout> and this is AndroidMainfest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.piyush.gangatechnicalcampus"> <uses-permission android:name="android.permission.INTERNET" ></uses-permission> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity"> <item android:id="@+id/action_settings" android:title="@string/action_settings" android:orderInCategory="100" app:showAsAction="never" /> </menu> </manifest> | 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've tried to create German quotation marks in LaTeX, but after compiling with \usepackage[ngerman]{babel}, I get this error: ! Package babel Error: Unknow option `ngerman'. Either you misspelled it (babel) or the language definition file ngerman.ldf was not found. The solution "Partei"' doesn't work at all and the alternative \glqq only works with the \usepackage[ngerman]{babel}... This is my code: \documentclass[12pt,a4paper,oneside]{scrartcl} \usepackage[latin1]{inputenc} %\usepackage[ngerman]{babel} \usepackage{graphics} \usepackage{multicol} \usepackage{hyperref} \renewcommand*{\UrlFont}{\normalfont} \usepackage{fancyhdr} can anybody help me please? I have to turn in my paper next week... Here's my "extended example": I want to have German quotation marks. Normally, there are two possibilities to accomplish that: either you do it this way: "`Partei"' and compile it. Unfortunately, this does not work any more (it has worked for my last paper, but I didn't change anything in my TeXmaker) you can write: \glqq Partei\grqq and then you get German quotation marks in case you have installed the \usepackage[ngerman]{babel} or \usepackage{german}, but with both usepackaged I get the error described above. Normally, I work with TeXmaker on Linux Ubuntu. Do you need any more information? I'm not quite an expert on this field, sorry... | I recently updated my operating system from Ubuntu 13.04 to Ubuntu 13.10. Since then, I am facing difficulties compiling my TeX code in which the french babel package is called. Please note that all my sources were compiling very fine before the system upgrade. However, now, given the following header: \usepackage[francais]{babel} I receive the following error: ! Package babel Error: Unknown option `francais'. Either you misspelled it What should I do? Please note that if I remove this part of code (\usepackage[francais]{babel}), everything is compiling well. I also tried it with french, and I receive the same result. Thank you in advance for your help. MINIMUM WORKING EXAMPLE : \documentclass[11pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[francais]{babel} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \begin{document} This is a MINIMUM WORKING EXAMPLE. \end{document} ! Package babel Error: Unknow option `francais'. Either you misspelled it |
I'm a student studying Computer Science and have been instructed in lecture that we shouldn't pass a class or struct by value and should only pass them by reference. Is this true? If so I'm curious to know why. | What is the difference between a parameter passed by reference a parameter passed by value? Could you give me some examples, please? |
Im trying to insert the next query in Oracle SQL Developer insert into table1 (specialString) values ("&&test"); but The SQL ask me for a var value how can I solve this? | I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &. How do I disable this feature so that SQL Plus ignores the ampersand? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.