body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I chopped up some raw assorted hot peppers, covered them with olive oil and then refrigerated them immediately. How long will they keep in the fridge?
I have some basil from my garden that I would like to infuse with olive oil to flavor it. I was going to pack the jar with the herbs and then pour the oil over it, keep it in a jar for about a week and then strain and store the oil for cooking. Are there any issues I should be aware of?
2019-03-01 to 2019-04-04 remove Saturday and Sunday between two dates and count total Days
I need a method for adding "business days" in PHP. For example, Friday 12/5 + 3 business days = Wednesday 12/10. At a minimum I need the code to understand weekends, but ideally it should account for US federal holidays as well. I'm sure I could come up with a solution by brute force if necessary, but I'm hoping there's a more elegant approach out there. Anyone? Thanks.
I want to make the windshield on my car a blue colour but when i go to assign a material it just turns the whole car body blue. How can i make it so it colours a certain couple of faces instead of the whole car?
How do you add more than one material to a mesh? I have tried adding two materials to the object, and then assigning one of the materials to a vertex-group, but I could not find a place to assign it. I am making a striped bouncy ball that I want to deform, so adding a different material by separating the mesh into different objects would not be ideal.
The text i want to search is [[Help: so this fails select * from tblWiktionaryPages where cl_Text_English like '%[[Help:%' Because [ was a special character in SQL So how do i escape [ and search? I have tried below things and both failed '%![![Help:%' '%\[\[Help:%'
I am trying to filter items with a stored procedure using like. The column is a varchar(15). The items I am trying to filter have square brackets in the name. For example: WC[R]S123456. If I do a LIKE 'WC[R]S123456' it will not return anything. I found some information on using the ESCAPE keyword with LIKE but I do not understand how to use it to treat the square brackets as a regular string.
I want an environment that creates a tabular inside a \parbox. The problem is how to put delimiters so that the whole thing becomes the second argument to the \parbox command. \newenvironment{tabularinparbox}[1]{% \parbox{\linewidth} % ... what here ? \begin{tabular}{#1} }{% \end{tabular} % and here ? }
I'm working on an exam document class where the user enters in questions something like this: \multiplechoice{Question} {Answer #1} {Answer #2} {Answer #3} {Answer #4} {Correct answer} {Explanation} I'd like to process this information in various ways in one LaTeX run (to create an answer sheet, key, and the test itself), so the questions need to be stored in a macro. The awkwardness comes when one defines: \newcommand{\sectionA}[1]{\newcommand{\putsectionA}{#1}} and then asks the user to put 15 questions as an argument to \sectionA. I'd much rather have those questions be the contents of an environment, like so: \begin{sectionA} lots of questions \end{sectionA} Mostly because I find it much easier to keep track of environment declarations than curly brackets. Is it possible to have the contents of an environment get packaged up into a macro? Edit: The solution would seem to be to us the environ package, but it doesn't seem to be working. Here's what I'm trying: \documentclass{article} \usepackage{environ} \NewEnviron{foo}{\edef\foot{\BODY}} \begin{document} \begin{foo} Store This \end{foo} \foot \end{document} However when running this code \foot remains undefined. It actually seems impossible to define any macro using environ. Even when not using \BODY. For example, replacing the definition above with \NewEnviron{foo}{\newcommand{\foot}{Print me}} still fails. I've also tried \Collect@Body from the environ package with similar results. Does \NewEnvrion somehow prohibit defining new commands?
In my home, we're not very fond of capsaicin, and I put too much crushed red pepper (, bloomed) into a vegetable soup[1]. What can I do to remedy the soup? (Obviously, I can cook another pot of soup and combine them, but I'd rather not. Any other remedies?) [1] The soup was made roughly thus: I bloomed the crushed red pepper in a heavy-handed application of and added onion and garlic to saute a little and then to sweat; then I added vegetables and water and seasonings, heated it, and let it simmer.
I just made tomato soup with two cans of tomatoes with jalapeno peppers in it. The soup has turned out to be too spicy. How can I reduce the spicy (heat) level of the soup?
I have a string like this "$2,099,585.43" "$" maybe any symbol, like @,#..etc. I want to convert this into 2099585.43 Is there any simple way to do this?
I have a text box that will have a currency string in it that I then need to convert that string to a double to perform some operations on it. "$1,100.00" → 1100.00 This needs to occur all client side. I have no choice but to leave the currency string as a currency string as input but need to cast/convert it to a double to allow some mathematical operations.
I've read an article about a Chemist who completed another bachelor's degree in Philosophy by finishing free MOOC courses. His new "degree' may not be academically accredited in any Graduate School of Philosophy. But is it still worth mentioning in your curriculum vitae/resume as a new "degree"?
Can I include in my academic CV that I have attended and completed the and classes I have been taking? I understand that these are not anything major, but the courses definitely gives a good overview and starting formal study on the subject becomes less cryptic. If I can include them without any negative impacts, then under what section should I include them?
I am trying to build a program that will take a sentence from user and return the language of the text to the user. When I run my application, I get this error: Exception in thread "main" java.lang.NoClassDefFoundError: net/arnx/jsonic/JSONException Does this mean I have to download jsonic and add it as a jar file to my application? import java.util.ArrayList; import com.cybozu.labs.langdetect.Detector; import com.cybozu.labs.langdetect.DetectorFactory; import com.cybozu.labs.langdetect.Language; import java.util.Scanner; import com.cybozu.labs.langdetect.LangDetectException; public class LangDetectSample { public void init(String profileDirectory) throws LangDetectException { DetectorFactory.loadProfile(profileDirectory); } public String detect(String text) throws LangDetectException { Detector detector = DetectorFactory.create(); detector.append(text); return detector.detect(); } public ArrayList detectLangs(String text) throws LangDetectException { Detector detector = DetectorFactory.create(); detector.append(text); return detector.getProbabilities(); } public static void main(String[] args) throws LangDetectException { LangDetectSample detector = new LangDetectSample(); Scanner scanner = new Scanner(System.in); System.out.print("Enter text: "); String input = scanner.nextLine(); String language = detector.detect(input); System.out.print(language); } }
I am getting a NoClassDefFoundError when I run my Java application. What is typically the cause of this?
Is anyone knows how to convert date or string to a number in SAQL? specifically convert this: toString(now(), "yyyy") into number
I want to do calculations with dates and use 'current year' in a formula condition. When I tried to manipulate dates in a formula I always receive an error of incompatibles types; NUMBER AND DATE. Because of that I had to convert the date fields into numbers in the dataflow. It worked but I didn't resolve the issue of current year because it is impossible to convert a field that change with time. The condition and the formula is the following: case when 'Date_Month'+'Date_Year'*12> 2+'current year'*12 then 0 when ('current-'Date_Year')*12+(2-'Date_Month')) % max('Billing_Periodicity') == 0 then 'Parcel_Bill' else 0 Many Thanks for your attention and help
In my case the stretch will be between Bologna and Rimini in the summer. Are reservations required? Or is it realistic to show up at the train station and get tickets / seats on the next train?
I am planning a trip to Italy this coming January. My plan is to land by plane in Roma and then go to France by train/bus stopping in some Northern Italian cities on the way, enjoying the architecture, the atmosphere, the art and and the food. I want to do it at my own pace, without heavy scheduling. Ideally, I would just decide which cities to visit, and take a train whenever I feel it. I often do this here in South Korea where I am living, taking advantage of the "standing seats" as it is called here, that is travelling (for a cheap price and no reservation) standing on the romm between two cars. From my experience, it is also doable in Taiwan (at least in some trains). In France, regional trains usually does not need any reservation, so you can buy a ticket and take the train whenever you want. Can I expect a similar system in Italy, that is a way to make short travels between close cities without reservation? Example of "short travel": Pisa - Firenze.
Yet again it happened. I forgot to update my macports and I'm wasting hours... How can I automatically run sudo port -v selfupdate sudo port -v upgrade outdated Let say every week? Note that it has to be ran as root... How do you maintain you macports up-to-date? Is something like suggested is a good idea?
I want to use launchd to update my MacPorts tree periodically (i.e. port selfupdate. I have created /Library/LaunchDaemons/org.macports.selfupdate.plist: $ ls -l /Library/LaunchDaemons/org.macports.selfupdate.plist -rw-r--r-- 1 root wheel 669 8 Nov 12:49 /Library/LaunchDaemons/org.macports.selfupdate.plist It has the following contents: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.macports.selfupdate</string> <key>ProgramArguments</key> <array> <string>/opt/local/bin/port</string> <string>selfupdate</string> </array> <key>StandardOutPath</key> <string>/var/log/org.macports.selfupdate.log</string> <key>StandardErrorPath</key> <string>/var/log/org.macports.selfupdate.err</string> <key>RunAtLoad</key> <true/> <key>StartInterval</key> <integer>604800</integer><!-- 1 week --> </dict> </plist> I've loaded it and verified that it's loaded: $ launchctl list | grep macports - 78 org.macports.selfupdate But it doesn't look like it actually run. $ port info wireshark Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'. wireshark @1.12.8_3 (net) ... What am I missing?
Show if $Q ∩[0,1]$ is compact. It is bounded. It contains it limit point $1$, therefore it is closed = > compact. What is wrong with this conclusion?
Is $[0,1] \cap \Bbb Q$ a compact subset of $\Bbb Q$? I get the feeling it isn't compact, but I can't figure out a way to prove this. I understand that, in $\Bbb Q$, any open set $U = \Bbb Q \cap O_i$ such that $O_i \subseteq R$. But I can't figure out a way to construct a finite set that doesn't contain the intersection set.
I am moving from Java to Python. In Java, Static variables will return the same value to all objects of a class even if it is changed by another object of the same class. In the Python book that I'm reading, the author says, a data member is entered into class namespace if it's assignment takes place within the immediate scope of the class definition. I'm using IDLE, the Python Interpreter, and below is the Python code: class ABC: OVRLIMIT_FEE=5 >>> a=ABC() >>> b=ABC() >>> a.OVRLIMIT_FEE+=1 >>> a.OVRLIMIT_FEE 6 >>> b.OVRLIMIT_FEE 5 But if it enters the class namespace, should it not return same value when it is accessed with both a and b ?
Is it possible to have static class variables or methods in Python? What syntax is required to do this?
I installed Ubuntu on my HP Stream 11, I was pleased to find out that my WiFi worked but the range is terrible. To have a good signal I have to be right next router. How can I improve the quality of the signal? $ lspci 00:00.0 Host bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register (rev 21) 00:02.0 VGA compatible controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller (rev 21) 00:0b.0 Signal processing controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller (rev 21) 00:14.0 USB controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller (rev 21) 00:1a.0 Encryption controller: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine (rev 21) 00:1b.0 Audio device: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series High Definition Audio Controller (rev 21) 00:1c.0 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 (rev 21) 00:1c.3 PCI bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #4 (rev 21) 00:1f.0 ISA bridge: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU (rev 21) 00:1f.3 SMBus: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx SMBus Controller (rev 21) 01:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01) 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
So I just started using linux/ubuntu today and I've been getting problems with my wifi, ive tried the solutions on this page: When im really close to my router, its fine, i can see wifi signals, but when i go just a few steps back it disappears right away. Im using the latest version of ubuntu 17.10 Any suggestions would be nice! :)
So, I am running a game of D&D 3.5 and I have a player character in the group whose backstory includes his mother having gone insane at some point in the past. As she is a marked heir of her house, money shouldn't be a thing for having her madness removed magically (Eberron Dragonmarked house, Lyrander, essentially a mercantile family with wealth to rival nations) yet the player wishes for her madness to be beyond the ken of most readily available spells. I was wondering if the Lords of Madness book has any rules on this. I was thinking of a few things here. her madness is a coping mechanism, something in her past was so horrible that she does not want to confront it. her madness is some sort of unknown curse or ailment. it is the effect of a Daelkyr's direct influence on her (this is my current train of thought). I don't want it to be as simple as get to level x, cast spell y, done. I was thinking of perhaps linking her to the Daelkyr in some way and maybe having him battle the ancient evil for the fate of his mother. Something like that. What are your thoughts, advice?
I'm running a Dungeons and Dragons 3.5 (not Pathfinder) game, and I want to create a system by which players can use certain abilities, but at the cost of sanity and self-control. Is there a system that models progressive, growing insanity through stat changes? There would be other effects that are specific to the story, but those could be minor tweaks to the existing system.
I am giving my iPhone to my daughter. How do I clear my information and set up hers? I want to make sure I do not lose any of my information from my accounts that I use on my current phone.
I had an iPhone on loan from a friend to try it out and now I need to give it back. How do I make sure that everything is erased from it? SMS, Calendar, Phone Logs, contacts?
I can imagine a lot of people saying it that way in conversation. I could imagine a lot of people saying it that way in conversation. Do we always have to use the expression I could imagine in past contexts? Or can we sometimes use it in the same way as I can imagine in some present/future contexts?
Could/can any native english speaker tell me what the difference between 'can' and 'could' in the following sentences is. And, are they interchangeable in the following context? What Difference do the words can and could create when making a request or an offer? Here are the examples: Suppose, I am looking for a particular bank but I don't know where the bank is. I meet an old man and want to know the direction of the bank from him. So I ask him "Can/Could you please tell me where the bank is?" Can/Could anyone please teach me how to share videos and photos on Facebook? As usual, if there is anything ungrammatical in the writing, please correct it.
Looking at the weekly user reputation leagues, I see that users are ranked based on how much reputation they have gained during that week. However, I see that there are no ties in the rankings; each place is assigned to one user only. So how are these ties in weekly reputation broken? Looking at the first page of results from , I can see that the answer is not: Total reputation for the user last week's rank change in place from last week user number What is the tie breaker?
Does anyone know how SO user reputation leagues work for people who have the same recent score? I was wondering because I checked the league and I saw We all have the same month reputation. However, I'm ranked #878 while MadProgrammer is ranked #876! Obviously this is a GIANT bug that must be corrected at once. But actually, how is this decided? It's bugging me that I can't find any pattern. By total rep it goes: 3rd-1st-2nd By rank change: 1st-3rd-2nd (maybe) By membership time: 2nd-1st-3rd Alphabetically: 3rd-1st-2nd By badges: 3rd-1st-2nd By coolness of pic: 3rd-2nd-1st So the only thing I can think of is that someone wrote an extremely sophisticated algorithm to rank the coolness of pictures and then ranks them in reverse order. If this is true, can I please have it? -EDIT- Went back today and it looks like Aaron is probably right
Given a url like https://somedomain.com:1234/someotherstuff?a=b#def the browser's URL class's origin property returns https://somedomain.com:1234 var url = new URL("https://somedomain.com:1234/someotherstuff?a=b#def"); console.log(url.origin); prints "https://somedomain.com:1234" Is there an equivalent in .NET? I see the Uri class but it doesn't seem to have a field that corresponds to origin above Uri u = new Uri("https://somedomain.com:1234/someotherstuff?a=b#def"); Console.WriteLine(u.AbsolutePath); // /someotherstuff Console.WriteLine(u.AbsoluteUri); // https://somedomain.com:1234/someotherstuff?a=b#def Console.WriteLine(u.Fragment); // #def Console.WriteLine(u.Host); // somedomain.com Console.WriteLine(u.LocalPath); // /someotherstuff Console.WriteLine(u.Port); // 1234 Console.WriteLine(u.Query); // ?a=b Console.WriteLine(u.DnsSafeHost); // somedomain.com Console.WriteLine(u.HostNameType); // Dns Console.WriteLine(u.Scheme); // https From that it appears I need to do this string origin = u.Scheme + "://" + u.host + (String.IsNullOrEmpty(u.Port) ? "" : (":" + u.Port) And possibly some other stuff I'm not aware of. Is there already some cross platform (not Windows only) .NET function that will give me the equivalent of URL.origin?
Is there a simple way in .NET to quickly get the current protocol, host, and port? For example, if I'm on the following URL: http://www.mywebsite.com:80/pages/page1.aspx I need to return: http://www.mywebsite.com:80 I know I can use Request.Url.AbsoluteUri to get the complete URL, and I know I can use Request.Url.Authority to get the host and port, but I'm not sure of the best way to get the protocol without parsing out the URL string. Any suggestions?
I recently installed Ubuntu, I have it for Dual Boot. Windows is already installed on a different Drive. For install, I used the whole disk and wiped it thinking I would be able to resize the main partition so I could create a new partition for extra space for Extra space. However, in Gparted does not allow Resizing and remains with Keys image in front of the Ext4 partition. It is only using 24.55GiB of 906Gib. I have in the image linked turned off swap.
Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers. Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions). Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space. How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?
I have mined some ebony ore at the Throat Of The World and the ore won't come back.
In previous games, the amount of minerals found in a vein was set in stone. Now that blacksmithing is a feature, will minerals regrow after a certain amount of time as plants do?
Alien invaders find a deserted earth and revive a human mummy to get answers. He doesn't have a clue and they kill him. They revive a man's ashes from the city and he disappears. In the end the man has arranged things so that the aliens fearing they are taking him back to their home planet commit suicide by aiming their spaceship into a sun while the man leaves the ships with the secret of the device that animates dead bodies.
I read this about 30/40 years ago. I don't remember if it was a short story or book. What I remember of it : Some aliens arrive at earth; they don't find any living humans, just empty cities. They go to one museum and revive an Egyptian mummy. When it's alive, it keeps asking where his servants are. They don't get any information from the mummy so they kill him again. Later on they revive another human, who turns out to be more intelligent than the aliens. I don't remember much of what happened from this point on, except: In the end the human starts to revive other humans. Some one can tell me what story, name of book.
Let $Y = \prod_{i\in I}X_i$ have the standard product topology over $X$ (all $X_i$ s are equal), and $Z = C(I,X)$ with the compact-open topology. If $I$ is discrete, are Y and Z equivalent? This seems true but I can't find any confirmation and am not sure how to formally prove it. I may just be confused as many formulations of the product topology give a basis in the terms of a product of subsets rather than a subset of products If I'm understanding, each $A \in Y$ is a subset which contains all products where to each $i_1,i_2,\dots ,i_n$ is assigned any arbitrary open set X from a specified collection $O_1,O_2,\dots ,O_n$. The set contains all products of this form, regardless of what values they assign to each of the other elements of I. Then A should exist in Z from the intersection with each k of the mappings which take the compact set $\{i_k\}$ to an $O \in O_k$, taking the union to capture each $O_k$. Each $B \in Z$ sshould also be of this form (since in particular each compact set in the discrete I is finite, and all of these cases can be formed from finite intersection or infinite union of this case. Am I correct in how I'm understanding these? Is there a good way to formally equate these two?
I'm really confused with the statement. let $X$ be a set endowed with the discrete topology and let $Y$ be any topological space. Show that $M(X,Y)$, the space of continuous maps from $X$ to $Y$ endowed with the compact open topology, is homeomorphic to the topological product $ \prod_{x \in X} Y_x$, $Y_x = Y$. Can you please explain what we really have to prove?
Determine $L$ such that the function $f:\mathbb{R^2} \to \mathbb{R}$, defined by $$f((x,y)) = \begin{cases} \frac{\sin(xy)}{\sqrt{x^2+y^2}} & (x,y) \in \mathbb R^2/(0,0) \\ L & (x,y) = (0,0) \end{cases}$$ is continuous at $(0,0)$. I supposed that the wanted $L$ is $0$ and I used continuity( module of difference) to show that it converges to $0$, but I am not quite sure it`s the right answer. Any help, please?
I got a function: $f(x,y) = \frac {\sin (xy)} {\sqrt {x^2 + y^2}}$ if $(x,y) \not = (0,0)$, otherwise $f(x,y) = 0$, and I should look at its continuity in $(0,0)$ I tried the sandwich theorem but got slightly stuck unfortunately $ 0 \le \left|\frac {\sin (xy)} {\sqrt {x^2 + y^2}}\right| \le 1$ I was thinking that $\sin (xy)$ is a restricted function, but not sure what to with $\sqrt {x^2 + y^2}$ if $x,y$ are too small so I think my idea doesn't work. Then it would look like: $ 0 \le \left| {\sin (xy)} \right| \le \sqrt {x^2 + y^2} = 0$ Any other idea please?
I'm having the following scenario: I'm working with Deep Learning for solving seismic processing tasks. The seismic data may be understood as a collection of images that represents a given sub-surface region. Kind of an x-ray but to see the underground. To simplify, it is a discrete cube $C$, and each sample $s \in C$ are real numbers. A seismic cube can be seen as a 3D matrix of real values: My question is in regard to the best practices for normalizing such kind of dataset for training and inferencing. Usually, the neural network (NN) receives batches of sections (images) of this volumes. But it is unfeasible to load this volume beforehand to compute their min/max values to perform some kind of normalization and standardization. And we know that ideally, the NN should receive samples (images) such that their values are in the range $[0,1]$. What is the recommended practice to train the NN in this situation? And after I got the trained network, how to treat the new images for inference?
Do I transform all my data or folds (if CV is applied) at the same time? e.g. (allData - mean(allData)) / sd(allData) Do I transform trainset and testset separately? e.g. (trainData - mean(trainData)) / sd(trainData) (testData - mean(testData)) / sd(testData) Or do I transform trainset and use calculations on the testset? e.g. (trainData - mean(trainData)) / sd(trainData) (testData - mean(trainData)) / sd(trainData) I believe 3 is the right way. If 3 is correct do I have to worry about the mean not being 0 or the range not being between [0; 1] or [-1; 1] (normalization) of the testset?
Just only one object is rendered I'm using blender render and Version 2.79
Why is the selected object displaying in the 3D view, but not rendering? In object mode, it shows up: However, it does not show up in render mode: Why is this so and what causes it to hide in render mode?
Shouldn't PropertyInfo.GetCustomAttribute(s) return the same instance of Attribute? The following code appears it returns different instances: using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Reflection; namespace AttributeNoShared { [TestClass] public class UnitTest1 { private sealed class AnyAttribute : Attribute { } private sealed class AnyClass { [Any] public int AnyProperty { get; set; } } [TestMethod] public void TestMethod1() { var propertyInfo = typeof(AnyClass).GetProperty(nameof(AnyClass.AnyProperty)); var result1 = propertyInfo.GetCustomAttribute<AnyAttribute>(); var result2 = propertyInfo.GetCustomAttribute<AnyAttribute>(); Assert.AreEqual(result1, result2); // This succeeded Assert.IsTrue(object.ReferenceEquals(result1, result2), "Different instance of attribute"); // This failed } } } Is this a bug? I'm expecting runtime Attribute to be shared because I would like to store some state in it.
So I was playing around a little more with attributes in .NET, and realized that every call to Type.GetCustomAttributes() creates a new instance of my attribute. Why is that? I would think that the attribute instance would basically be a singleton-per-MemberInfo, with 1 instance bound to the Type, PropertyInfo, etc... Here is my test code: using System; namespace AttribTest { [AttributeUsage(AttributeTargets.Class)] class MyAttribAttribute : Attribute { public string Value { get; set; } public MyAttribAttribute() : base() { Console.WriteLine("Created MyAttrib instance"); } } [MyAttrib(Value = "SetOnClass")] class MyClass { } class Program { static void Main(string[] args) { Console.WriteLine("Getting attributes for MyClass."); object[] a = typeof(MyClass).GetCustomAttributes(false); ((MyAttribAttribute)a[0]).Value = "a1"; Console.WriteLine("Getting attributes for MyClass."); a = typeof(MyClass).GetCustomAttributes(false); Console.WriteLine(((MyAttribAttribute)a[0]).Value); Console.ReadKey(); } } } Now if I were to implement attributes, I would expect the output to be: Created MyAttrib instance Getting attributes for MyClass. Getting attributes for MyClass. a1 Where the "class loader" (sorry, I have more of a Java background, not 100% sure how .net loads its types) would compile MyClass, and create an instance of MyAttribAttribute, and store them together somewhere. (probably the Perm Gen in the heap if this were Java) The 2 calls to GetCustomAttributes() would then just return the same earlier created instance. But the actual output is: Getting attributes for MyClass. Created MyAttrib instance Getting attributes for MyClass. Created MyAttrib instance SetOnClass So... why? It seems like creating a new instance of all these objects for every call is a bit excessive, and not good for performance/memory management. Is there any way to always get the same instance over and over? Anyone have any ideas why it was designed this way? The reason I care at all is because I made a custom attribute that internally holds some validation information, so in the Attribute I basically have a "private bool Validated" that I set to true. The validation stuff takes a while, so I don't want to run it every time. Now the problem is that since it creates a new instance of the attribute each time I get the attributes, Validated is always "false".
I was trying to write the following into a file using sed, in a Windows .bat file: <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Test|AnyCPU'"> I came across a problem when doing this, and that problem is that, in Windows, double quoting escaping is up to the program's implementation, according to . So writing the sequence into a text file was a real headache on sed for Windows. Edit: Note that this question is NOT about how to escape double quotes in batch, but how to escape double quotes in sed for Windows, so does not resolve the question. For anyone wondering how to resolve this, see the accepted answer.
How would I go about replacing all of the double quotes in my batch file's parameters with escaped double quotes? This is my current batch file, which expands all of its command line parameters inside the string: @echo off call bash --verbose -c "g++-linux-4.1 %*" It then uses that string to make a call to Cygwin's bash, executing a Linux cross-compiler. Unfortunately, I'm getting parameters like these passed in to my batch file: "launch-linux-g++.bat" -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -DNDEBUG -c -o "C:\Users\Me\Documents\Testing\SparseLib\bin\Win32\LinuxRelease\hello.o" "c:\Users\Me\Documents\Testing\SparseLib\SparseLib\hello.cpp" Where the first quote around the first path passed in is prematurely ending the string being passed to GCC, and passing the rest of the parameters directly to bash (which fails spectacularly.) I imagine if I can concatenate the parameters into a single string then escape the quotes it should work fine, but I'm having difficulty determining how to do this. Does anyone know?
I've been given the following problem. Prove that $$\lim_{N\to\infty}\sum_{i=1}^N\frac1i=\infty.$$ In other words I need to prove that the partial sum of the harmonic series diverges. I know the integral test works in this case, but does anybody know of any other methods for showing this?
Can someone give a simple explanation as to why the $$\sum_{n=1}^\infty\frac1n=\frac 1 1 + \frac 12 + \frac 13 + \cdots $$ doesn't converge, on the other hand it grows very slowly? I'd prefer an easily comprehensible explanation rather than a rigorous proof regularly found in undergraduate textbooks.
With lots of help of you I ended up with . Something has gone wrong because my mesh is moving .... Any ideas what has gone wrong ?
So I recorded some Footage in front of my school and tracked it. The tracking points themselves seem alright (I think) but I get an average solve error of around Five. Here are my settings: The camera used for recording is a Canon Vixia HF M40. Project file:
Here is the link, please help me what it means below: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C2518248EEA14886 What should I do with the link above
I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following: W: GPG error: trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?
In word to vec module each word has two vectors inside and out side. Or when the word belongs to the context word and when the word belongs to the center word. In the end do we normalize those vectors by adding them up or we just take the inside vectors(Vc)?
In word2vec's CBOW and skip-gram models, how does choosing word vectors from $W$ (input word matrix) vs. choosing word vectors from $W'$ (output word matrix) impact the quality of the resulting word vectors? CBOW: Skip-gram:
This is a pretty vague question so please bear with me. I can add further information if required; just let me know in the comments. So here is the problem that I want to solve. There is a system which gives certain voltage output which is the error in a system. It is a sinusoidal wave the peak to peak value of which is my error voltage. I have to take that error voltage and then give a voltage signal to an electronically controlled attenuator which then attenuates my system and changes the error voltage. Obviously I have to minimize the attenuator voltage. But here are the problematic parts: There is an error null point of voltage which, when given to the attenuator, will nullify the error that null point is not known. The circuit has to find out that null point and keep the attenuator voltage there. The error null point may change change during the operation of the system due to different things. That may create some problems too. Can someone help me design an electronic systems (maybe using op-amps?) to solve this problem? Edit: We have a microcontroller-based system for this already. It uses the ADC of the controller and a DAC to give the voltage to the attenuator. But I just thought maybe there are simpler ways to do this.
I have a small project where I am PID tuning two servo motors. Something very similar to this: I am interested in finding the system type of the above setup, which includes the PID loop I have tuned. I know that the system type can be very generally described as the number of integrators or poles at the origin in the system. - I know that I am dealing with a cascaded control system. Loop 1: Standard DC motor closed loop system (for both servo motors). Loop 2: PID tuning of that servo motor such that when I want a 90 degree rotation, the servo motor does not actually overshoot. Loop 3: PID that I have created myself on top of the whole system. Below is a Simulink block diagram of what I predict the cascaded loops would look like. How would I be able to estimate accurately or work out the number of integrators in such a system?
Can someone tell me what the icon of a server and a blue database symbol means. It is attached to database engine instance in my object explore view. (I apologize, I am unable to add a image of the symbol at this time as I am new to stack overflow and am short two rep points needed to post images. If necessary when I cross the rep points threshold, I will attach an image.)
What does the icon of a server with a blue database symbol mean?
I guess this has to do with our habit on desktop computers where we open an application use it close the application AFAIK there's no direct way from within the application to close it. And by pressing the Home button app just gets into the background. Still running. I got a habit of pressing Home, then Recent apps and flicking all open apps out. Is this a bad habit? Should I leave applications like GMail, FB, Currents, GNow, etc. running or is it better to close them and have as less apps as possible running?
I'm new to the Android platform, and this is probably a dumb question, but... How do you close an app? When I'm in an app, and I want to get out, I just click on "Home" and move on, but I just installed a Task Manager app, and I noticed everything is left running. Is there a way to exit apps? Or do I need to use the Task Manager every time I exit something?
I have a doubt about the following codes. I thought that data-type primitives assigned to a variable in JS were passed by value, while objects were passed by reference. If functions are objects in JS, I thought they should be passed by reference, but the following two codes behave as passed by value: CODE 1 var x = function hello(){ console.log("hello")}; console.log(x); var y = x; console.log(y); x = function bye(){console.log("bye")}; console.log(x); console.log(y); OUTPUT [Function: hello] [Function: hello] [Function: bye] [Function: hello] CODE 2 In this case I assigned a method to a global variable and the behavior is the same: var x = {name:"Max", action: function one(){console.log("one")} } var y = x.action; console.log(y); x.action = function two(){console.log("two")}; console.log(x.action); console.log(y); OUTPUT [Function: one] [Function: two] [Function: one] I truly appreciate any insight and explanation on this.
The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself). Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?
Let $X$ be a measure space with positive measure $\mu$. If $\|f_n-f\|_p\to 0$ (i.e. $f_n$ converges to $f$ in the $L^p(\mu)$ norm) does it follow that $f_n(x)\to f(x)$ almost everywhere?
If I know $\| f_n - f \|_{L^p(\mathbb{R})} \to 0$ as $n \to \infty$, do I know that $\lim_{n \to \infty}f_n(x) = f(x)$ for almost every $x$?
Affects: 14.04 / 14.10 / 15.04 / 15.10 / 16.04 / 16.10 I started my dropbox deamon today, with the following result in the panel: The icon with the warning/failed symbol should be my Dropbox icon. I cannot right-click or left-click it, so no interaction. I am running Xubuntu 15.10 on 4.2.0-27-generic x64. I also tried to re-install Dropbox, reinstall nautilus-dropbox, recursively delete ./cache/sessions/ as well as set other themes and icon sets. Apparently nothing helped and similar problems described here and on other boards are similar, not the same and do not work in my case.
A few hours ago the dropbox icon in Xubuntu 14.04 stopped working. The icon is black with a red slashed zero. I cannot click on it to bring up the dropbox menu. I believe there was an update right before this happened. I reinstalled then purged dropbox. I even deleted all associated files and hidden folders and after I installed it again. Still, the icon is not working. Tried to stop and start the service... again nothing.
It is a know fact that in any real Hilbert space $E$, given a point $a \in E$ and $C$ a closed convex and non-empty set in $E$, theres one and only one $x \in C$ such that $d(a,x) = d(a,C)$. My question is: can it be extended to norms not coming from an inner product in a Banach space? It is easy to prove that: Uniqueness of such a $x$ is guaranteed when $(E, \| . \|)$ is a strictly convex space. The existence always holds if $E$ is finite dimensional. So does the existence holds without any assumption on the dimension of $E$, even if it's a strictly convex Banach space?
The following statement is true for Hilbert spaces $H$: Every closed convex set ${\cal C} \subset H$ has a unique element $x$ such that for any $y \in C$, we have $|x| \leq |y|$. Is this statement still true for Banach spaces? If not, what is a counterexample?
I tried deleting a folder in my /opt/ file that I had created but got the message rm: cannot remove '/opt/*': Is a directory I created this folder, so why am I getting that message? Thanks again for any help with this!
I have created a folder in my file system called "opt". It contains two other folders. How do I delete it with signing in as a root user? Thanks
I'm pretty new to c++, i'm now trying to learn all the basics, I know when default constructors are called, but when i tried different syntax it doesn't work like i expected. Look at the following code: class a; class b(); class c(NULL); 'class' is a class i created with default constructor, for a and c everything works well, but for b it just won't recognize the variable as a class member. As i see it b and c are basically the same, what's wrong than? Thanks!
Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++? MyObject object; // ok - default ctor MyObject object(blah); // ok MyObject object(); // error I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?
Basically, there is a "type" in a database that has "Probation" in it. There is also a time stamp of "2017-01-15 22:18:44" for example in RealDate. No matter how long ago the date is, the difference still returns true like it's within three days. Any suggestions? $doR = $totalArr[$i]['RealDate']; $start = strtotime($doR); $today = time(); $diff = ($start-$today)/(60 * 60 * 24); if($diff < 5){ $parole = "<span style=\"color:red\"> - ON PAROLE</span>"; }
How to calculate minute difference between two date-times in PHP?
If the electric current is defined as Coulomb/second, why is the direction of the current is just the opposite of the direction of the flow of electrons?
I recently came to know about the Conventional Current vs. Electron Flow issue. Doing some search I found that the reason for this is that Benjamin Franklin made a mistake when naming positive and negative charges. There is even this little comic about that My question is, how can a naming convention be wrong? Perhaps I don't understand what is the actual mistake here, I don't know. But I don't see how a naming convention could be wrong or right. There is no right and wrong about that. It could've been any other name, like charge A and charge B. I'll appreciate anyone can help me understand what is wrong in all this.
I flagged a question on Stack Overflow, but now I want to update my comments for flagging that question. Is this possible? Also is it possible to undo a flag on a question?
I'm wondering (since it just happened to me), is it possible to "cancel" ("undo", "delete", "retract", whatever) a flag I just raised if I misclicked it, so the mods won't waste time? I looked everywhere, but I can't find such a feature.
I am attempting to relocate the database directory for my mysql installation to a newly install ssd. Configuration: Ubuntu 16.04 mysql Ver 14.14 Distrib 5.7.12, for Linux (x86_64) using EditLine wrapper I modified /etc/mysql/my.cnf to include a new database dir: datadir = /mnt/5abeaa6e-7536-4213-bb3e-97aa9a81be16/mysql Now in running sudo service mysql start it brings up a permissions error: mysqld[9002]: mysqld: Can't change dir to '/mnt/5abeaa6e-7536-4213-bb3e-97aa9a81be16/mysql/' (Errcode: 13 - Permission denied) I have run both recursive chmod and chown commands on the new directory to match it up and the stat readout now shows as follows: $ stat /var/lib/mysql File: '/var/lib/mysql' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 812h/2066d Inode: 13381090 Links: 8 Access: (0700/drwx------) Uid: ( 127/ mysql) Gid: ( 134/ mysql) Access: 2016-06-23 09:42:37.687378790 -0700 Modify: 2016-06-23 09:46:04.679025933 -0700 Change: 2016-06-23 09:46:04.679025933 -0700 Birth: - $ stat /mnt/5abeaa6e-7536-4213-bb3e-97aa9a81be16/mysql File: '/mnt/5abeaa6e-7536-4213-bb3e-97aa9a81be16/mysql' Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 820h/2080d Inode: 3276801 Links: 3 Access: (0700/drwx------) Uid: ( 127/ mysql) Gid: ( 134/ mysql) Access: 2016-06-23 09:45:16.190998487 -0700 Modify: 2016-06-22 18:37:37.707197266 -0700 Change: 2016-06-23 09:45:16.190998487 -0700 Birth: - I also modified /etc/apparmor.d/usr.sbin.mysqld to # Allow data dir access # /var/lib/mysql/ r, # /var/lib/mysql/** rwk, /mnt/5abeaa6e-7536-4213-bb3e-97aa9a81be16/mysql/ r, /mnt/5abeaa6e-7536-4213-bb3e-97aa9a81be16/mysql/** rwk, Any ideas would be appreciated.
I am trying to move the data directory of my MySQL database to a second disk array that I have as a mount point /array2/. The problem I am having is I have tried everything and after I modify the location of datadir in my.cnf mysql will not start up again. All I get is: start: Job failed to start
I have a data matrix $M$ that has $n$ samples (rows) described by $m$ variables (columns) $X_1,X_2,\ldots X_m$. I do a SVD to reduce the $m$ dimensions to just 3 dimensions. I understand that the $x,y,z$ coordinates (i.e., the SVD values) are calculated from the eigenvectors of $MM^T$. My question is, if I pick an arbitrary point in the SVD space (i.e. a value for SVD1, SVD2, SVD3, not necessarily in the data), is there a convenient way to translate that back to a set of the original variables (i.e., $X_1, X_2, \ldots X_m$)?
Principal component analysis (PCA) can be used for dimensionality reduction. After such dimensionality reduction is performed, how can one approximately reconstruct the original variables/features from a small number of principal components? Alternatively, how can one remove or discard several principal components from the data? In other words, how to reverse PCA? Given that PCA is closely related to singular value decomposition (SVD), the same question can be asked as follows: how to reverse SVD?
How do you project multiple images onto a single object? I have tried some things but it never worked. I have tried to search for it online but to no success and with my current skill level I am not able to come up with a viable solution. Under here you see an example of something I'm trying to make. As you see I will need to project three images onto an object but I don't know-howbj. Maybe there is another smarter way and a better workflow. Any suggestion will be gladly appreciated
I am trying to model the inside of a room (brick walls, wooden floor). I modelled it from 4 planes, put together like walls. This has problems with the edges not aligning when using displacement however. So I think it may be better to switch to a cube. I find it difficult to uv-unwrap it however. I want the roof to be slanted. But I can't figure out how to apply the texture correctly if I do, since it becomes warped, like this: And I wanted a look something like this: How would one go around UV-unwrapping for that? Best way that doesn't warp the "gables" (ends of the house, hope it's the right word) is to unwrap those by themselves. Only disadvantage to this is that blender will not see to it that proportions are kept then, so bricks will not be same size on all sides. Also if possible I would like to avoid seams at the corners.
I have a number of quads (suppose like 20-40) and i want to quickly check the collisions between any of them. I would like to know if there's a quick algorithm to do that 60 times per second without performance decrease
How exactly does a work? This is an extremely broad question. What code keeps things bouncing against each other, what code makes the player walk into a wall instead of walk through the wall? How does the code constantly refresh the players position and objects position to keep gravity and collision working as it should? If you don't know what a collision engine is, basically it's generally used in to make the player acutally hit walls and the like. There's the 2D type and the 3D type, but they all accomplish the same thing: collision. So, what keeps a collision engine ticking?
Pretty new coder here.. Working on the Princeton algorithms one course and I'm attempting the "Stack with max" assignment. public class Stack { private Node first = null; private class Node { int item; Node next; } public void push(int item, Stack max) { Node oldFirst = first; first = new Node(); first.item = item; first.next = oldFirst; // if the first value is null put it to max stack if(first == null) { max.first.item = item; max.first.next = oldFirst; } // otherwise if the item is greater than the max stack's top value, add it to the max stack else if(item >= max.first.item) { max.first.item = item; max.first.next = oldFirst; } } public int pop(Stack max) { int item = first.item; first = first.next; // if the item removed is the max value (top of max stack) then also remove it from the max stack if(item == max.first.item) { max.first = max.first.next; } return item; } public static void main(String[] args) { Stack allValues = new Stack(); Stack maxValues = new Stack(); allValues.push(3, maxValues); } } Whenever I run the code, I get a nullpointerexception pointing to line 22. else if(item >= max.first.item) I'm not sure why this is happening as I'm only trying to push an item into the max stack when the first item is not null. Any help would be greatly appreciated. Thank you :)
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 know this has alredy been answered in & also My problem is this: Could Not Backup The Following files make sure you are able to open them /home/me/.cache/dconf /home/me/.config/enchant /home/me/.dbus /home/me/.gvfs So, my question is two-fold, 1. Is it required for me to "Back-up" above mentioned items ? 2. Does above mentioned files should have "my" (User) permission over "root" permission? [ i.e. going by one of the solution given by @david-foerster, I should change the permission for 1 & 3rd item on list, but what about other two? ] Thanks !
When I'm Backing Up My Files Using the Backup Application, at the last time it shows a error that Could Not Backup The Following files make sure you are able to open them /home/neel/.cache/dconf /home/neel/.dbus
I watched an anime movie 4-8 years ago. Here's what I can remember: It's about two brothers, they go to school. But the older brother has a sword and has to find gems/stones which make it more powerful. The younger brother wants him to stop (because of the evil that comes with that power I think). Now I can't remember what was up with the stones at this point, but the brothers entered some kind of other world (it looked very bright I think) and had to fight, I THINK the older brother wanted to have the last stone which the younger one had. I don't remember the ending.
I watched this movie when I was a kid and never discovered it again. It’s about a boy whose father left him after his divorce from the mother, the kid enters a world somehow where he has a big sword he needs to keep searching for precious stones to fill it with. it has certain holes that look like each stone shape! I also remember the kid going to eat with his mythical (dragon-like friend), and he gets stuck in the restaurant because the crazy restaurant lady won’t let him leave without finishing huge amounts of food! The kid also gets bullied so I’m guessing the the swords journey is to teach the kid how to deal with all of this...
I have got three different suggested edit counts on my . I am wondering which one is correct. First, one is my , it shows the suggested edit count as 67. Second, when I look at the detail of any suggestion, like one and click on More, I get Editor Stats, which says “Devraj Gadhavi had 69 edit suggestions approved, and 5 edit suggestions rejected”. Third, when I look at the review queue for or and hover my mouse over the badge progress bar it shows 45 against . By searching the , I have come to conclusion that the 2nd one could be due to some posts being deleted, after my suggested edit was approved. But what about the 3rd one? Which is correct? 1st or 3rd? EDIT This is not answered by similar question. As, according to answer So what seems to be happening is: the "Editor Stats" count all edits, live or not the "Suggestions" page lists only live edits the reviewer badges only take live (and approved obviously) edits into account If 2 and 3 both show only live edits, then they should be equal. But they are not. My suggested edits are 69 + 5 in editor stats. 67 in suggestions page 45 in the badge progress
I think I found a bug on Stack Overflow, would like to have feedback if it is, so you can eventually fix it! If I go on my personal profile in SO on the activity tab and select the suggestion button (in order to see all edits I have suggested) I see 19 entries: However, if I select one of the suggested edits and follow the link I see in my Editor Stats that I actually have 20 edit suggestions, and so it looks as if one went lost. What's going on? Which stat is correct? (Don't know if it's of any use but I remember doing 20...) EDIT: new proof of bug added, if I go on my review section in the lateral tab I'll see this recapitulation, which goes against editor stats
Long time Drupal front-end dev but doing more site building lately and have been using Drush much more. One of the biggest limitations I've found with downloading (dl) command is that you have to know the machine name of the module, which is not a big issue for say Views or Context. But who knows the machine name of stuff like node reference or simple google maps? I guess and get it right sometimes, or I have to hit d.o to figure it out. Is there a list function I havent uncovered? The other answers to this on Stack Overflow and Drupal Answers are pretty bad. drush dl module-name-here
With yum you can do yum list available ..., and know the name of the package you want to install. For example, there is the Mime Mail module in Drupal. What name should I use with drush dl, mime_mail, or mimemail? So does drush have something like yum list available?
I was conducting some experiments on my sockpuppet, which included handing out a chat suspension to... well, myself, on another account. I discovered, however, that the "your account has been suspended" message that shows up is unreadable: Highlighting the text, I can see what it says: your account has been temporarily suspended by a moderator and cannot chat for 59 minutes. But otherwise, only the two words "your account" are visible, leaving users possibly confused about why they can't send any messages and why there's a link to their chat profile showing up instead of the textbox.
If you visit a chat room attached to a beta site while logged out, the log in message is all but unreadable, being dark grey on a dark blue background. For example, visit while logged out or in private browsing mode.
As you probably know, when 2 particles are entangled, they share some properties, even when separated long distances. If 2 devices each had entangled particles, would it be possible to communicate though them, by changes properties of one, which changes the properties of the other. If this was possible, then we could communicate faster than light. But, is it possible?
From what I gather, communication is not possible with quantum mechanics. With the experiment on teleportation, entanglement is referred to as coordination and not communication. However, my belief is that communication is taking place. For example, given if a qubit has more information than a bit, this will mean that after Alice entangles/sends the qubit and prior to Bob measuring it, information is communicated. Am I missing something? Yes. I have studied superdense coding. I also understand about the 2 classical bits. Let me add clarity to my question. Alice has a qubit which is sent to Bob. The qubit is not a regular bit and it contains more information than a bit. So, at the end of the day, Bob ends up receiving a qubit. And what I was saying in my original question, let's assume Bob does not read it but rather uses this qubit in a circuit. Hence, Bob is able to harness the information of a qubit which contains more information than regular classical bits. Hence, I see that communication of information is taking place. Is there something I am missing and/or can I clarify further my question. Thank you!
Ubuntu uses the information about searches to show the user ads to buy various things from Amazon. Amazon commits many wrongs (see ); by promoting Amazon, Canonical contributes to them. However, the ads are not the core of the problem. The main issue is the spying. Canonical says it does not tell Amazon who searched for what. However, it is just as bad for Canonical to collect your personal information as it would have been for Amazon to collect it. Same question has been asked here But I don't have the tab 'search results' on my 12.04 distro. How can I disable this? I understand that canonical uses this business plan in order to make a living and I really would help in their research as long as the data is preserved anonymously, but I really want to have control over this option, so when I search for something to buy, then enable it so I can help canonical gather this data, otherwise I would like this option disabled. Thank you
How can I disable Amazon search results in the Dash?
I work with a lot of datasets from outside sources with times in the format mm:ss.000. As such I'm constantly copying them into new workbooks, where excel will display the relevant columns as mm:ss.0. Changing them is simple enough and quick enough, but my life would be fractionally better if I could make it DEFAULT (in any new workbook) to three decimal places. This is about TIMES, not DATES, and because I'm talking about fractions of a seconds it's not possible to do via the locale/region settings in Windows' Control Panel. At least, I don't think it is? Possible? Update: This question is different from this , as in regional settings it's not possible to choose a time format with decimals of a second.
When I paste a date into Excel 2010 in the format "2012-12-07 00:00:00.000" I'd like it to be displayed by default as "2012-12-07", but it is actually displayed as "00:00.0". I know I can work around this by prepending a ' or changing the cell format, but I'm interested in changing the default format. An approach that almost works is going to Control Panel->Region and Language->Long Time format and changing it to something like "h". This results in Excel displaying the dates I paste in as "2012-12-07 00:00:00.000", but screws up times displayed outside of Excel. The dates I'm pasting in are from SQL Server.
I have an old, slow netbook. I love Ubuntu and also Ubuntu has good repositories. Is there any version of Ubuntu without a desktop environment?
I have a Windows XP laptop, in which I run VirtualBox with the latest Ubuntu, my hardware is little old, so running the latest version of Ubuntu inside Virtual box is kind of a hassle, very slow performances, even if all i'm doing is running the terminal and practicing Linux commands ! I tried DSL (Damn Small Linux) with my VirtualBox, very small distro (50 MB), I am satisfied with how faster is my system now, but I miss Ubuntu, moreover, DSL is missing too many commands, such as sed an many others that I can't remember. Is it possible to run Ubuntu just in console mode, no GUI or minimum GUI...no nice effects no fancy graphics? A link / tutorial would be much appreciated.
Trying to LAN and my son can come into my world but I can't go into his. No firewalls, both MACs IP addresses match. This just started since the 1.9 update. Any ideas to fix this?
My LAN server won't let my cousin join me or me join my cousin. It won't show up on the multiplayer screen - it keeps saying "scanning for LAN servers" but it never finds it. I am at his house and we use different computers but it won't connect. How can I fix this?
Every time I boot or log in I get system message that says there is no more free space left in the boot partition. There is 384MB in the boot partition. Yes, they appear all used up when using the disk analyzer tool. There is nothing I did consciously to cause this. It is a single boot system with nothing fancy loading on startup. How to allocate more space on this boot partition? Which set of commands or tools should I use?
Based on some recommendations I read online, on install of a new (Ubuntu) system, I made my /boot partition separate from / and small in size (only around 50 MB). It makes sense to me that you would only need limited files in that partition, and the boot sequence only needs so much data initial data on boot so no need (or so goes my thinking) to make it much larger. I was surprised as I started using my system and installing software was failing due to the following (or similar) issue: gzip: stdout: No space left on device cpio: write error: Broken pipe E: mkinitramfs failure cpio 1 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-18-generic with 1. I have already seen and am planning on doing a reinstall with a larger /boot partition. My questions are: Why does the /boot partition data get updated when I am only installing software? obviously 50 MB is too small for my needs, so what would be a reasonable /boot partition size? Does it even make sense to have separate boot partition? after all it could simply use all the disk space it wants in the / partition.
Beamer tells me \textsubscript is undefined. Isn't it a core LaTeX command? How can I use the command in Beamer? This example throws "undefined control sequence" errors and does not subscript the numbers. \documentclass{beamer} \newcommand{\octave}[1]{\textsubscript{#1}} \begin{document} \begin{frame} Musical octaves are designated with subscript numbers: A\octave{1}, A\octave{2}, A\octave{3}, and so on. \end{frame} \end{document} ANSWER/WARNING The package fixltx2e provides a \textsubscript command. The memoir document class (and probably others) loads fixltx2e by default; beamer does not. If you want to write a package that you can use in both classes, adding \RequirePackage{fixltx2e} can cause problems with any class that already loads that package. But if \textsubscript is the only reason for loading fixltx2e, then it is better to use the subscript package instead.
It's easy to make subscripts in math mode: $a_i$. How do I make a subscript outside math environment, likethis?
Update: it's actually hmac(secret, time). I'll leave the post as-is, in case someone is ever looking for the hash(secret+time) case (for which I provided some reasoning at least), but for TOTP tokens, this question is a duplicate of . TOTP tokens are basically hash(secret+time). Since you don't know the secret, you can't use them as prefix to compute the random "near-collision block pair", so an attack like Shattered won't work here (even if the time matched this random block pair, which it also won't). Am I correct in thinking that Shattered does not apply to TOTP? Are there any other attacks that do? Of course, the recommendation is always to move away from SHA-1, but the question is whether this is a direct vulnerability that a well-funded attacker could exploit or (as far as is public knowledge) just hardening advice.
This Q & A says that the security of HMAC-SHA1 does not depend on resistance to collisions? Are they are saying specifically with respect to HOTP or for HMAC-SHA1 for any use? If HMAC-SHA1 is used for verifying the integrity of a document and you can find a collision, you can make changes in the document, right? Even the RFC says that resistance to collisions is relevant The security of the message authentication mechanism presented here depends on cryptographic properties of the hash function H: the resistance to collision finding (limited to the case where the initial value is secret and random, and where the output of the function is not explicitly available to the attacker), and the message authentication property of the compression function of H when applied to single blocks What am I missing here?
Consider: var re = /(?<=foo)bar/gi; It is an invalid regular expression in Plunker. Why?
Is there a way to achieve the equivalent of a in javascript regular expressions? I need to match a string that does not start with a specific set of characters. It seems I am unable to find a regex that does this without failing if the matched part is found at the beginning of the string. Negative lookbehinds seem to be the only answer, but javascript doesn't have one. EDIT: This is the regex that I would like to work, but it doesn't: (?<!([abcdefg]))m So it would match the 'm' in 'jim' or 'm', but not 'jam'
good morning I want to prove that $$D_n = \det \begin{pmatrix} x & 0 & \cdots & \cdots & 0 & 1 \\ -1 & x & 0 & \vdots & 0 & 2 \\ 0 &-1 & \ddots & \ddots & \vdots & \vdots \\ \vdots & \ddots & \ddots & x & 0 & n-2 \\ 0 & \cdots & 0 & - 1 & x & n-1 \\ 0 & \cdots & 0 & 0 & - 1 & x \\ \end{pmatrix} $$ $D_n = x^n + x^{n - 1} + \left( {n - 1} \right)x^{n - 2} + \cdots( {n - m + 1} )x^{n - m} + \cdots + 3x^2 + 2x + 1$ thank you in advance
of a monic polynomial $f \in \mathbb F\left[x\right]$ in $1$ variable $x$ over a field $\mathbb F$ plays an important role in understanding the structure of finite dimensional $\mathbb F[x]$-modules. It is an important fact that the characteristic polynomial and the minimal polynomial of $C(f)$ are both equal to $f$. This can be seen quite easily by induction on the degree of $f$. Does anyone know a different proof of this fact? I would love to see a graph theoretic proof or a non inductive algebraic proof, but I would be happy with anything that makes it seem like more than a coincidence!
I'm trying to recode the function strcat featuring an auto-malloc inside it. I can see in few tests that there are some data leaks (I don't know the correct word) in my function. Here's my code : char *my_strcat(char *a, char *b) { char *result; int i; int j; int la; int lb; la = -1; lb = -1; while (a[++la] != '\0'); while (b[++lb] != '\0'); result = malloc(sizeof(char) * (la + lb) + 1); i = -1; while (a[++i] != '\0') result[i] = a[i]; j = -1; while (b[++j] != '\0') result[i + j] = b[j]; result[i + j] = '\0'; return (result); } So when I try to use my my_strcat in a while loop with some one-length strings I get a : a.out: malloc.c:2392: sysmalloc: Assertion `(old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)' failed. Aborted (core dumped) I'm trying to find where my memory leak comes from. But I can't figure out. Here's the calling part : while (!is_line_ended(read_result)) { read(fd, read_result, READ_SIZE); result = my_strcat(result, read_line(read_result, fd)); } Here's MY_STRLEN : # define MY_STRLEN(s) (sizeof(s)/sizeof(s[0])) Please notice that I'm limited to one file and one header. I'm limited to 5 functions by file, and I'm not allowed to use string functions.
First off, here is some code: int main() { int days[] = {1,2,3,4,5}; int *ptr = days; printf("%u\n", sizeof(days)); printf("%u\n", sizeof(ptr)); return 0; } Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?
I understand how to change the colors of the editor itself ( as in the link: ) but now I want to change the application interface from white with black font to black with green font. Do I still use .texprofile? Any help would be much appreciated.
So, to make it abundantly clear what I am asking for, here is an example picture edited (poorly) in a drawing software: At left, you can see my current TexStudio look: the are where real text is indeed entered had its colors properly customized with a .txsprofile object. However, the menu toolbar, the tabs area and so on are still colored in light-gray, while I would like them to have a darker look (as in the image to the right). Is it possible to achieve that somehow? I am aware that plenty of questions have been asked here and elsewhere on the topic of TexStudio's colors. For example: However, none of them really addressed the main point at hand: how to customize the colors of TexStudio's menus, toolbars, etc (not the colors of the text-editor part of TexStudio). The colors of the text-editor of TexStudio can be modified directly at the Syntax Highlighting options in the Tools>Configurations menu. However, rarely something is said about the other parts of TexStudio. When a question pops up about this, it gets either no answers or very low-detailed reactions. For instance: I realize that what TexStudio is doing is probably just retrieving the operational system color for it's menus, tool-bars and such. My question is whether there is anyway to bypass that and customize such colors.
I would like to have this info during run-time or in ipython. For example, import matplotlib How do I know which matplotlib.py is used if I have multiple versions or I just want to know where the file located. Thanks
I want to detect whether module has changed. Now, using inotify is simple, you just need to know the directory you want to get notifications from. How do I retrieve a module's path in python?
I tried to get a pattern by doing $11^1 / 7 = 1 , r=4$ $11^2/7 = 17, r=2$ $11^3 / 7 = 190, r=1$ but the numbers keep getting larger and larger and I think this is not the way to go about this problem. Can someone please explain the correct way on how to deal with these problems?
I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two: $13^{100} \bmod 7$ $7^{100} \bmod 13$ I've also heard of this formula: $$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n $$ But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?) Any hints or pointers in the right direction would be great.
I am stuck at this problem "We don't provide only wireless equipment" or "We don't only provide wireless equipment" In the above-mentioned sentences, which one is correct? Please help me.
Which is grammatically correct? I can only do so much in this time. or I can do only so much in this time.
I have approximately ~60000 tests, each taking between 30 mins and 2 hours, to run. Sequentially that is insane, so I have decided to run the tests on separate threads. I'm designing the solution now, and I feel it's important to know how many threads I should safely run at a time. I have a 12 core Linux server at my disposal. Is it possible to utilize as many cores as possible with a single Java application, and how would I find out a safe number of Threads to have alive at once without testing and possibly taking down the server? Thanks.
I am writing a server, and I send each action of into a separate thread when the request is received. I do this because almost every request makes a database query. I am using a threadpool library to cut down on construction/destruction of threads. My question is: what is a good cutoff point for I/O threads like these? I know it would just be a rough estimate, but are we talking hundreds? Thousands? How would I go about figuring out what this cutoff would be? EDIT: Thank you all for your responses, it seems like I am just going to have to test it to find out my thread count ceiling. The question is though: how do I know I've hit that ceiling? What exactly should I measure?
I just got an email from Stack Exchange, telling me that the grace period on my bounty had started: Your bounty on the question … … ended and will be auto-closed after the 24-hour grace period expires. Thanks for putting a bounty on your question. It looks like there are still no answers yet. You should consider improving your question to attract more answers. Could you: (...) However, it's not my question. It's someone else's question which I put a bounty on. I know this is minor, but maybe the logic should be fixed, so that the text in these emails is correct, even if the bounty is on someone else's question, and not on my own one.
I put a bounty on but unfortunately there are no answers yet. Today I received a reminder by email that my bounty is about to expire. The part of the text that seems weird is (emphasis by me): Thanks for putting a bounty on your question. It looks like there are still no answers yet. You should consider improving your question to attract more answers. Could you: add more text describing the problem? add or change the tags? update the title to more accurately reflect the issue? However, this is not my question, but Sid's question. Should there be a different text in the email if I put a bounty on someone else's question? Or also have an email sent to the original author telling them that "a bounty by someone else is about to expire could you please improve your question"? Because as it stands, the text in the email does not really match the "situation".
So The question is like in the title I tried some algebra of limits, but Frankly speaking I really have no clue where to start especially, because if $a\neq 0 $ then $\sum\limits_{i=1}^{\infty} {a_i} = a$ diverges. So just a hint where to start, what to look at would be great.
I have this problem I'm working on. Hints are much appreciated (I don't want complete proof): In a normed vector space, if $ x_n \longrightarrow x $ then $ z_n = \frac{x_1 + \dots +x_n}{n} \longrightarrow x $ I've been trying adding and subtracting inside the norm... but I don't seem to get anywhere. Thanks!
We are going to build a application for school labs. Each lab contains maximum 60 students and all the students has to be connected in a local network. Each student will get a Android tablet or a desktop to watch the videos which will be served from a Lab's Server. Here server has following tasks. It has to download videos from internet or cloud at some time in a day by manually or cron. It has to a run an Apache/Nginx server to stream the downloaded videos to all the students connected. we are thinking to code in NOdejs or python. It has to serve 50 to 60 clients for 2 hrs continuously in different batches. For example 4 different batch students(50 students) may come to the lab and listen to the videos. So server uptime will be 8 hrs per day with max 60 concurrent connections at a time. Now, we are in a situation that do we need a dedicated server for serving clients offline or a desktop with good processor and RAM is enough? Please guide us in this usecase. Happy to give more details.Please comment.
This is a about Related: I have a question regarding capacity planning. Can the Server Fault community please help with the following: What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?
How to prove that the center of the group algebra of the symmetric group is generated by 1-cycle conjugacy classes? I mean, that the center (consisting on class functions) is multiplicatively generated by classes of cycle permutations.
I'd like to know a reference for a simple proof that $\{c_\mu\mid \mu\vdash n\}$ is a basis for the centre of the symmetric group algebra $\mathbb{C}\mathfrak{S}_n$, where $c_\mu$ is the sum of all elements of a given cycle type (i.e. the sum of every element in the conjugacy class corresponding to $\mu$).
Does anyone know a shortcut or even an AutoHotKey script that opens Screen sketch directly? i know that the shortcut Win+W opens Windows Ink Workspace but i have to select screen sketch afterward (which is annoying). Any help appreciated.
I want to use the windows 10 screen sketch and launch it with a single click. I know I can configure the pen to launch it - but that's not good for me. I want to be able to launch it from the Volume up/down keys of the surface itself. Since it wasn't probably designed for that - I'll settle for running it from a command line (that I'll hook to the volume up button myself) Any help would be highly appreciated
I am trying to match string with mypattern, somehow I do not get correct result. Can you please point where am I wrong? import re mypattern = '_U_[R|S]_data.csv' string = 'X003_U_R_data.csv' re.match(mypattern, string)
What is the difference between the search() and match() functions in the ? I've read the (), but I never seem to remember it. I keep having to look it up and re-learn it. I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head. Or at least I'll have a better place to return with my question and it will take less time to re-learn it.
Question: In quantum mechanics, physicists make use of linear maps P and Q on an infinite dimensional vector space so that $PQ-QP=I$. Prove that if V is a finite dimensional vector space, and $P:V \rightarrow V$ and $Q: V \rightarrow V$ are linear maps, then $PQ-QP \ne I $ (there is no quantum mechanical theory in finite dimensions). Attempt: I was a bit put off by this question but I think I might have worked out a solution and I'm not sure if it's acceptable. I decided to use the trace property of matrices. $$Tr(PQ) = \sum_{i}\sum_{j}p_{ij}q_{ji} $$ $$Tr(QP)=\sum_{j}\sum_{i}q_{ji}p_{ij}$$ $$Tr(PQ-QP) = \Big( \sum_{i}\sum_{j}p_{ij}q_{ji} \Big)-\Big(\sum_{j}\sum_{i}q_{ji}p_{ij}\Big) = 0 < Tr(I)$$ Is there something I'm missing?
The following question is from Artin's Algebra. If $A$ and $B$ are two square matrices with real entries, show that $AB-BA=I$ has no solutions. I have no idea on how to tackle this question. I tried block multiplication, but it didn't appear to work.
I am working on a Winform application. On button click I need to launch a new 3rd party exe. For this I am using the following code: private void btnUserMgmt_Click(object sender, EventArgs e) { if (!IsAlreadyRunning()) { System.Diagnostics.Process proc = new System.Diagnostics.Process { StartInfo = new System.Diagnostics.ProcessStartInfo { FileName = strAppPath + "ReveaLINXUserMgmt/ReveaLINXUserMgmt.exe", Arguments = "192.168.0.121\\TESTDBSERVER", UseShellExecute = false, RedirectStandardOutput = true, CreateNoWindow = true, } }; proc.Start(); } } private bool IsAlreadyRunning() { var processExists = System.Diagnostics.Process.GetProcesses().Any(p => p.ProcessName.Contains("ReveaLINXUserMgmt")); return processExists; } Now it is launching fine and running on the top of my main application window. I need when some one again click btnUserMgmt button. If ReveaLINXUserMgmt.exe is already running and in minimized state, it will come on top of window. If user closes the main application, child exe will also to be closed
Using C# and WPF under .NET (rather than or console), what is the correct way to create an application that can only be run as a single instance? I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are. The code needs to also inform the already-running instance that the user tried to start a second one, and maybe also pass any command-line arguments if any existed.
Prove that the number of subsets with odd number of elements is equal to the number of subsets with even number of elements. I'm not sure how to approach this problem. Is this even true for me to prove. For example, the set {null} contain only one subset, itself, which is even. Thus, prove by contradiction?
Let $A$ be a non-empty set and $n$ be the number of elements in $A$, i.e. $n:=|A|$. I know that the number of elements of the power set of $A$ is $2^n$, i.e. $|\mathcal{P}(A)|=2^n$. I came across the fact that exactly half of the elements of $\mathcal{P}(A)$ contain an odd number of elements, and half of them an even number of elements. Can someone prove this? Or hint at a proof?
I have a table using bootstrap with pagination. In this table I have Action column consisting a delete button. I am using jQuery click event to do the action. In the first page of table, it is functioning normally but when I go to second page, this function is not working. Below are my codes. <div class="container"> <div class="body"> <div class="content"> <table id="example" class="table table-striped table-bordered table-hover" cellspacing="0" width="100%"> <thead> <tr> <th width="4%">S.N.</th> <th>Name</th> <th>Address</th> <th width="8%">Modified Date</th> <th width="24%">Action</th> </tr> </thead> <tbody> <?php $sn = 1; foreach ($rows as $result) { ?> <tr id=<?= $result['id'];?>> <td><? echo $sn++; ?></td> <td><? echo $result['name'] ?></td> <td><? echo $result['Address'] ?></td> <td><? echo $result['modified_date'] ?></td> <td> <?php <a href="delete.php?id=<?php $result['id']; ?>" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span>Delete</a>?> </td> </tr> <?php } ?> </tbody> </table> </div> </div> </div> <script type="text/javascript"> $(document).ready(function() { $('.btn-danger').on('click', function(event) { event.preventDefault(); alert(2); }); }); </script>
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 came across the following question in an under graduate course examination: Let $G$ be a group of all matrices of the form $ \pmatrix{x&x\\x&x}$, where $0\neq x\in \Bbb R$ under matrix multiplication. Find the inverse of any element in $G$. It appears to me that the question is wrongly framed because any matrix of the given form doesn't have inverse due to the fact that its determinant is zero.
G is the set of matrices of the form $G=$$\begin{pmatrix} x & x \\ x & x \end{pmatrix}$. So for this set to be a group I know it needs to be: Closed under matrix multiplication The Associative Property holds Contains an Identity Element Every element needs to have an inverse So the form of the matrices is such that all the elements are the same but not 0. How do I go about proving these? Working through this problem, I seem to have hit a contradiction. Since G is a subgroup of the bigger $2x2$ nonsingular matrices group why does G not have the same identity element as its parent group? Namely \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} Isn't the subgroup supposed to have the same identity element as its parent group?
Update If I do print(publicip.get()) then I get the correct ip addressed printed. If I do myip = publicip.get() and then do print(myip), then the value None gets printed Original Question When I ran the site on localhost, the value of myip would be 127.0.0.1. But publicip.get() would give me my public IP address. Unfortunately if myip = "127.0.0.1": and if myip = 127.0.0.1: give me syntax errors. What is the correct way of checking the value in the variable myip. myip, is_routable = get_client_ip(request) if myip = "127.0.0.1": myip = publicip.get() print("myip") print(myip)
My has failed me. In Python, are the following two tests for equality equivalent? n = 5 # Test one. if n == 5: print 'Yay!' # Test two. if n is 5: print 'Yay!' Does this hold true for objects where you would be comparing instances (a list say)? Okay, so this kind of answers my question: L = [] L.append(1) if L == [1]: print 'Yay!' # Holds true, but... if L is [1]: print 'Yay!' # Doesn't. So == tests value where is tests to see if they are the same object?
I'm trying to find book series, which I read few years ago. As title states, it's about group of students playing board RPG and being trapped inside by their GM. Few points I recall: The setting was typical medival fantasy with magic GM was their teacher One of players was on a wheelchair At the end they had own village. EDIT I've read these books no more than 10 years ago, and I think they were not new then. I know that doesn't say much, but that's all I can say. Some more details about history itself: One of players played as dwarf (I think it was the disabled one) and didn't really want to come back from there They managed to come back to real world at least once At least one of them died and has been ressurected It turns out that this series was found . I've browsed related questions but didn't see it. Sorry for duplicate nonetheless.
I read a book as a teenager and I am searching for it. (from around the 90's) Things I remember: I remember that one of the players was in a wheelchair and he played a dwarf, Also remember when the wizard woke up in the game world, he set off a lightning bolt and exploded most of their gear. I wish I could give you more, I read it and it inspired me to start playing D&D. Want to revisit it.
Can anyone help me this problem? I know the sum of consecutive integers is n(n+1)/2, but I don't know how to move forward from here. If 738 consecutive integers are added together, where the 178th number in sequence is 4,256,815, what is the remainder when this sum is divided by 6?
Can anyone help me with this? If 738 consecutive integers are added together, where the 178th number in the sequence is 4,256,815, what is the remainder when this sum is divided by 6?
We know that the magnitude and direction of angular momentum is quantized in quantum mechanics. We can explain the quantization with the help of quantum numbers. But actually who is responsible for this quantization? What is the significance of the reference direction? Can we take any arbitrary direction as the reference axes while considering space quantization? The angular momentum will be oriented in a particular direction (angle) with reference axis, then how other orientations are possible? ( as explained by different magnetic quantum numbers).
Why is it that unlike other quantum properties such as momentum and velocity, which usually are given through (probabilistic) continuous values, spin has a (probabilistic) discrete spectrum?
LEDs are marked as a particular voltage. If I have 4x1.2v LEDs I need a 4.8V battery. But if the battery is, say, 9V I will need a resistor in series to prevent damage. Resistors are not marked as a particular voltage, they are marked in Ohms. The voltage depends on the other resistors in series (including the internal resistance of the battery). But LEDs are not marked as having a particular resistance. If I have a number of LEDs of given voltage, and set of batteries (normal commercial AA/AAA etc), what size resistor do I need to protect the LEDs?
I have seen many resistances with difference Wattage i.e 1/4W, 1/2 W, 1 W, 2 W ,3W etc. If I have 3 W Load which is an (large 3W) LED in my case, which Resistance should I use? Also The LED I am using needs 3.5V DC and 0.8 A current. I have a Battery which outputs 8V. How can I calculate the Value of the resistance which can drop 8V to 6V?
I'm calling an actionFunction from Javascript to set a controller variable. Even though the variable is being updated within the controller, when I subsequently access it from the same piece of script it still holds the old value. Now I understand that the updated value will become available after rerendering, but I'd like to access the new value later in the same script. Is there any way I can refresh the controller variable during the lifetime of the script, or is it easier just to create a JS variable that holds the new value, and use that instead? UPDATE I'm not sure why this has been marked as a duplicate. This post describes a different issue, and the fix offered for my other post does not help with what I describe here. PAGE <apex:page controller="MyController"> <apex:form > <apex:outputPanel id="panel"> <apex:outputText value="MyString = {!MyString}"/> <apex:actionFunction name="SetString" rerender="panel"> <apex:param name="param1" value="" assignTo="{!MyString}"/> </apex:actionFunction> <script> function JSetString() { console.log('before: ' + '{!MyString}'); // shows last value assigned SetString('{!MyString}' + '.'); console.log('after: ' + '{!MyString}'); // doesn't show updated value } </script> <apex:outputPanel onclick="JSetString()" styleClass="btn"> Grow {!MyString} (works) </apex:outputPanel> </apex:outputPanel> </apex:form> </apex:page> CONTROLLER global class MyController { public MyController() { MyString = 'hello'; } public String MyString {get;set;} }
I'm trying to set a variable inside my controller via an actionFunction, which is called by some Javascript, which is initially called by either by an actionPanel (with styleClass='btn') or a commandButton. If the caller is the actionPanel then the variable updates reliably. However with the commandButton I can see the updated value flash briefly before reverting to its previous value. Maybe one out of every six clicks of the button actually causes the new value to stick. Sometimes it can take a dozen or more tries, regardless of click frequency. Can someone please explain what's going on here? PAGE <apex:page controller="MyController"> <apex:form > <apex:outputPanel id="panel"> <apex:outputText value="MyString = {!MyString}"/> <apex:actionFunction name="SetString" rerender="panel"> <apex:param name="param1" value="" assignTo="{!MyString}"/> </apex:actionFunction> <script> function JSetString() { SetString('{!MyString}' + '.'); } </script> <apex:outputPanel onclick="JSetString()" styleClass="btn"> Grow {!MyString} (works) </apex:outputPanel> <apex:commandButton onclick="JSetString()" value="Grow {!MyString} (unreliable)" rerender="panel"/> </apex:outputPanel> </apex:form> </apex:page> CONTROLLER global class MyController { public MyController() { MyString = 'hello'; } public String MyString {get;set;} }
I was wondering if anyone has heard of or knows and plans for Ubuntu on Nokia Lumia 610. I am fed up with the current operating system on Nokia Lumia 610 and I want to replace it with Ubuntu, or if Ubuntu is not currently available I would like to replace it with any other operating system which is stable. Thank you for taking your time to read my question. M.Aslam
With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time. Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions
Bit of noob, so forgive me in advance. Working in Eevee in 2.81, I can't get an emission shaded material to cast light onto a surface. I've got bloom enabled, and the emitting surface illuminates plenty of bloom effect, but the material doesn't cast light onto anything else. my other surfaces catch illumination from other lights just fine. I'm just using an emission shader node and material output - that's all. I'm used to building light sources out of objects in Cycles - what am I missing?
The closest I can get to making mesh lights affect their environment in Blender Eevee is giving them an Emission material and turning on "Bloom". But this isn't emitting proper light, it just looks like it is, but it doesn't light the surroundings whatsoever. I would like to be able to light a scene with meshes without having to put point lamps everywhere just to make them emit light.
My Windows 7 system automatically logs into the Administrator account without user input. Why does it do this?
I setup my Windows 7 to automatically log into my account at home. I have a password set so that I can access it remotely. It seems like this was a feature in control panel somewhere, but now I can't find it to turn if off. I know I used to use Tweak UI in older versions of windows to do this, and before that I could edit the registry . . . but it appears they changed it for Windows 7
I have been pondering on this over the last couple of days. I'm currently writing a web application (actually adding a screen to an existing, extensive application). I know that using "tables" for layout is a big no-no. But in this app, all of the pages use tables for layout. I decided to do my new page using divs instead. But I came across 2 hurdles. A lot of the layout stuff that I need to do were already done on the other pages and if I use divs instead, I cant reuse any of that (CSS's and JS and that kinda stuff). That leads to more work and pushes out my completion date. Some of the more complex parts of the layout are really difficult to do using divs and are really easy to do using tables. Maybe its just me being "old-school"y as I am not much of a web/html kinda guy (I get by). So, why can't I use tables? I'm not trying to be argumentative, just want to see if there are any compelling arguments beyond the "Its the right thing to do" type stuff. I know it is the right thing to do. I'd like to know why?
It seems to be the that tables should not be used for layout in HTML. Why? I have never (or rarely to be honest) seen good arguments for this. The usual answers are: It's good to But this is a fallacious argument; . I guess it's true that using the table element for layout has little to do with tabular data. So what? Does my boss care? Do my users care?Perhaps me or my fellow developers who have to maintain a web page care... Is a table less maintainable? I think using a table is than using divs and CSS.By the way... why is using a div or a span good separation of content from layout and a table not? Getting a good layout with only divs often requires a lot of nested divs. Readability of the codeI think it's the other way around. Most people understand HTML, few understand CSS. It's better for SEO not to use tablesWhy? Can anybody show some evidence that it is? Or a statement from Google that tables are discouraged from an SEO perspective? Tables are slower.An extra tbody element has to be inserted. This is peanuts for modern web browsers. Show me some benchmarks where the use of a table significantly slows down a page. A layout overhaul is easier without tables, see .Most web sites that need an upgrade need new content (HTML) as well. Scenarios where a new version of a web site only needs a new CSS file are not very likely. Zen Garden is a nice web site, but a bit theoretical. Not to mention its of CSS. I am really interested in good arguments to use divs + CSS instead of tables.
Is a Damned role always seen as Damned by a Seer? Are there exceptions? (what are they?) Can the check be influenced by items like a Wolf Pelt or Sceptre of Darkness or Veil of Shadows? Does the Damned status overrule the usual Seer result for a Maple Wolf or Lycan?
There are some occasions when one Role or Item says that it will 'make x happens' and then another Role or Item says that it will 'make y happen'. An example is the Bloodletter's ability used on somebody carrying a Veil of Shadows. Is there some system or list that can be provided that tells which effects have priority over which other effects? The only general rule I know to apply is the night immunity of Vampires, and some specific exceptions for Courts/DW and Succubi...
It'd be a nice touch to be able to edit your profile via the app. It seems it's not possible either through the mobile site (using Safari on my iPhone) as I'd like to be able to update my bio while I'm currently away from my Mac.
The iOS-app should provide (at least) the same features as the site and the ability to edit your profile is not so unimportant. In my opinion, the user should be able to change the every single info-field in his profile (including, but not limited to nickname, description, profile picture) by pressing an "Edit" button which should be located somewhere on his or her profile view.
I have a Linux server I'm using as a router for my internal network. I need to block all the websites except one or two using iptables. How can I set this up?
I would like to block sites using iptables. How do I go about this, and how do I ensure that the iptables rules are saved?
I've just learned SHM and I'm not able to understand why "phi" (initial phase) is an angle. Why are angles used in SHM?
Actually, in the mathematics sine and cosine functions are defined based on right angled triangles. But how will the representation of a wave or signal say based on these trigonometric functions (we can't draw any right angled triangles in the media, i.e., the air) then how can we say that?
According to that info box, the only thing I don't a positive question record. However, the math says I should. : I have asked 8 questions Of those, 3 are closed 0 have been deleted 0 have a negative score According to the , I have a question record score of: (8 - 0 - 3 - 0)/8 = 0.625 That's well above the 0.5 threshold. So why don't I have a positive question record (and therefore the Curious badge)?
As you can see in the picture, I have 13 out of 5. But it's been like this for about two months! What's the reason for that?
I know I can use -A, -B and -C to show surrounding lines but all of them also show the matching line. What I'm trying to make here is so, in this example file: foo bar I'd be doing something like grep <option> "bar" file and my output should be foo Side note: I know the way of doing it with another grep or using sed but I would like to do it just by using one time grep
I need to find a string and need to print the line above it. case1: The same line won't have the more than one matching pattern ie) consider a file containing $cat > para returns between the paragaraphs italic or bold quotes by placing italic Here i need to find for italic, and i need to get the output as below returns between the paragaraphs quotes by placing How can i get the output like this?
The following post was edited by : Attempting to edit the post opens it up without the title and the tags. The revision history of the post can be accessed . Surely one could copy/paste the title and add the tags while making the edit, but it seems like a bug. (Needless to say this issue is not observed on other posts.)
While trying to edit I noticed the title vanished: This is for inline edit, in the there's no title and no tags as well. Most likely the cause is the first revision of that question hard deleted as can be seen in the , but still I'd like to get title and tags back when editing.
Assume that the metric space $(X, d)$ is not compact. Show that there exists $f: X\to \Bbb R$ which is continuous but not bounded. The only function in my mind is $f: X\to \Bbb R$ defined by $f(x)=\|x\|$. I know this function is continuous. I don't know if it is bounded or not. I need a hint how to choose this function.
Suppose $(S,d)$ is a non-compact metric space. Is it possible to construct an unbounded continuous function from $S$ to $\mathbb{R}$? If it is possible, please show the construction method :) Here's my attempt to solve this problem: Because $S$ is not compact, we can find a neighborhood assignment function $N(x)$ so that a finite cover is not possible. Then each time we can find an uncovered point from the union of neighborhoods before, and change the function by $f(x):=max\{f(x),\text{a function which equals to the indice of this point at that point and gradually vanishes at further points from the selected point}\}$. However I'm concerned that while this function is unbounded, there may be some invalid points for this function (goes to infinity)... EDIT: As I found out there is a duplicate question, however the elementary solution is not presented in that question, so I still wish to know about this problem. :)