body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I just finished re-installing Ubuntu 18.04 on my Dell Lattitude E-6420 and logged in to re-install the apps I need. When trying to run sudo apt install <app>, I see the following error: bash: /usr/bin/sudo: Permission denied I see the same when running sudo ls /etc. Permissions on /usr/bin/sudo are: -rwsr-xr-x 1 root root 149080 Oct 10 2019 /usr/bin/sudo and I am in adm and sudo groups. What makes this even more odd is that when I log out from GNOME, then hit Ctrl+Alt+F2 or from the log-in screen and log into the terminal, I can now use sudo as that same user. Any ideas what could be happening or even better, how to fix it? | I updated to Ubuntu 20.04. When I use the default terminal, everything is fine. But if try to use terminator, I cannot use sudo. I get permission denied. Again, only when using terminator. How can I sudo from the terminator? I really would like to continue to use a terminator. Edit: I just also noted that it cannot find make either. I guess it's all messed up. I'll try to uninstall it and install again I guess. |
I'm trying create a set of modular 3D pieces in one blender file that I can use to build scenes. My idea was to create a single file with the modular pieces and then create a second blender file that would link to them to create the scene. Because I need to export my scene as glTF, I need to import the pieces from my first file wrapped in collections (if I just import the object, the glTF exporter ignores any transform I make to the linked object). I have carefully set the pivot points of my model pieces so that they can snap together easily. Unfortunately, if I put an object in a collection and that object is not at the world origin, when I import it the linked model includes the offset from the origin in my source file: I can solve this by moving the model to the world origin, but that causes another problem - now all my model pieces are overlapping each other in a cluttered, unworkable mess. Is there a way for me to link to my model pieces without having to move everything to the world origin? | I have created an Collection Instance, when I try to move it, the origin(to snap at vertices or edges) is far away from the object, I want to set it. In the image, the Collection Instance is selected, the cross is far away from the object and I can´t set it using "Set Origin to 3D Cursor" What Am I missing? |
I have a new hat... but it's not clear why. And the description needs some help post a message in chat within ±12 hours of the UTC New Year’s begin that gets starred "New Year's begin"? Did you mean within ±12 hours of the start of UTC New Year’s Day And it's Dec 8 to boot. I think we're well outside 12 hours of UTC New Year's | it appears you all forgot to change the year on those two hats. |
I asked a question about an hour ago via my iPhone and the official SE app, though On The Road hasn't been awarded yet. Is it broken? | During Winter Bash, users can earn hats. But sometimes it seems that a hat was awarded even though its requirements weren't (yet) met, or vice versa. What could be the reason for this? |
I am trying to Query "Event log files" from salesforce through Rest call. I have created a connected app with the following settings: OAuth Settings -> grant full access. Relax IP restrictions under OAuth Policies -> IP Relaxation. And, created a user with a profile "Read Only" under (salesforce license), having the following permission: API enabled View Event logs When I make a rest call to my salesforce enterprise edition account, I am getting the below error: URL: "https://MyinstanceURL/services/data/v41.0/query?q=SELECT+Id+FROM+EventLogFile+WHERE+Interval+=+'Hourly'" response :[{"message":"\nSELECT Id FROM EventLogFile WHERE Interval = 'Hourly'\n ^\nERROR at Row:1:Column:16\nsObject type 'EventLogFile' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.","errorCode":"INVALID_TYPE"}]| RESPONSE CODE: 400 Please, could anyone tell me where I am wrong? | Hey everyone I've been seeing this a lot lately and am trying to figure out why this error is thrown when querying the SOAP API directly. I've tried several very basic SOQL queries such as SELECT Body FROM AssetFeed Only to be met with the sObject type 'AssetFeed' is not supported. error. The account that I'm currently querying is just a standard user who accepted permission from an app that was created by a Developer Account, so I'm wondering if it might be permissions from the user or permission from the app itself? Possibly because Developer accounts cannot use 95% of whats offered? The WSDL used is a v27.0 generated Partner WSDL if that helps narrow it down. I've noticed this in multiple standard objects, so I'm wondering what the trend really is? Seems like a good informational question for future googling of others? Running describeGlobal() Array ( [0] => AggregateResult [1] => Attachment [2] => ChatterActivity [3] => CollaborationGroup [4] => CollaborationGroupFeed [5] => CollaborationGroupMember [6] => CollaborationGroupMemberRequest [7] => CollaborationInvitation [8] => ContentDocument [9] => ContentDocumentFeed [10] => ContentDocumentHistory [11] => ContentDocumentLink [12] => ContentVersion [13] => ContentVersionHistory [14] => EntitySubscription [15] => FeedComment [16] => FeedItem [17] => FeedLike [18] => FeedTrackedChange [19] => Group [20] => GroupMember [21] => HashtagDefinition [22] => Name [23] => TaskPriority [24] => TaskStatus [25] => User [26] => UserFeed [27] => UserPreference [28] => UserRecordAccess [29] => UserRole ) Where would all the rest of my SOAP SObjects be? This seems like a very thin list compared to the 295 SObjects advertised |
When code is run in the context of a platform event, which time zone is chosen as the context time zone, and can that time zone be configured? Unlike site guest users, the "Process Automated" entity doesn't seem to have related user record where a time zone can be set. | What does Salesforce use as the system time when running those jobs? The current system time (UTC)? My context is that I have a job that is run every 30 minutes and it executes a task for some of my users. The User object has 4 numeric fields to represent start hour, end hour, start minute and end minute. With those fields I calculate the second in the day the job should start, and the second it should end. With those two values I can compare with the system's current second, and check if the job should run for the user or not. Some days ago this was a scheduled class that was rescheduling itself using my user credentials ('Scheduled by Renato' and records would be marked as 'Last modified by Renato' too). Then I decided to change to platform events so they would be marked as "Last modified by Automated Process" instead (which is what I want). Now everytime the class is run, it publishes a event, and the event trigger fires the class' code that was inside the execute block. However, the timing seems off, and users are not receiving the tasks in the correct time anymore. To get the current second correctly, I've used this code: Integer offset = TimeZone.getTimeZone('America/Sao_Paulo').getOffSet(DateTime.now()); Integer current_second = Util.getCurrentSecond() + (offset/1000); Util class' method: public static Integer getCurrentSecond() { return Integer.valueOf((DateTime.now().hour() * 60 * 60) + (DateTime.now().minute() * 60)); } Have I not considered something when using the Platform Events? Edit: I just edited my code to include a call to a service that sends a message to me through Telegram. The code ran in the platform event context, and the timing is correct. System time is UTC and São Paulo is UTC-2 (originally -3, but -2 because of Daylight Saving Time): System second: 21960 Current second: 14760 |
I have multiple buttons in my app and I want to set the same text for every button using a loop. So I declared an array and filled it with the buttons in this manner: public class MainActivity extends AppCompatActivity { Button b1,b2,b3; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); b1=(Button)findViewById(R.id.button); b2=(Button)findViewById(R.id.button2); b3=(Button)findViewById(R.id.button3); } Button[] buArray ={b1,b2,b3}; void b1clicked(View view) { for (int i =0;i<3;i++) { buArray[i].setText("it works"); } } } But when i try to set text for a button from the array like this buArray[0].setText("some text"); This causes my app to crash and force closes And gives me an error like this in the the log "NullPointerException | What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely? |
I am having trouble proving that it is equal to zero analytically. I have tried plotting and know that for $0<x<1$ the integrand is negative and positive otherwise. I have tried substitution $u\to \sqrt{x}$ but I cannot proceed further. | The integral is from P. Nahin's "Inside Interesting Integrals...", problem C2.1. His proposed solution includes trigonometric substitution and the use of log-sine integral. However, I think the problem should have an easier solution (without appealing to another complicated integral at least). I have the following trick in mind. Let's introduce the substitution $x=4-z$ $$I=\int_0^4 \frac{\ln x}{\sqrt{4x-x^2}}~dx=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~d(4-z)=\int_0^4 \frac{\ln (4-z)}{\sqrt{4z-z^2}}~dz$$ $$2I=\int_0^4 \frac{\ln (4x-x^2)}{\sqrt{4x-x^2}}~dx$$ $$I=\int_0^4 \frac{\ln \sqrt{4x-x^2}}{\sqrt{4x-x^2}}~dx$$ And here I'm stuck. I'm not sure if this can go somewhere. Maybe partial integration can help, but I don't know how to choose the functions. What do you think? Here is . Only does not use trig substitution, it used gamma function instead. If there are no other ways, I'm prepared to give up on my question. But I would be grateful if it's left open at least for several days Edit After many attempts, I conclude that there is no trick to this integral. The reason is: the general form of this integral in not zero, but has the same symmetry properties, as the above case: $$I(a)=\int_0^a \frac{\ln x}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln (a-x)}{\sqrt{ax-x^2}}~dx=\int_0^a \frac{\ln \sqrt{ax-x^2}}{\sqrt{ax-x^2}}~dx \neq 0$$ $$I(4)=0$$ So we will get nothing from symmetry considerations alone. There are two possible ways to solve this - either trigonometric substitution or gamma function. Edit 2 I was wrong it seems, see the accepted answer. |
Please tell me a good reference book of complex analysis. I am a postgraduate student. I really need this. I want to strong my basic concepts from starting. So please help me ..... Now I am reading complex analysis by 'kasana' | I'm out of college, and trying to self-learn complex analysis. I'm finding text difficult. Any recommendations? I'm probably at an intermediate sophistication level for an undergrad. (Bonus points if the text has a section on the Riemann Zeta function and the Prime Number Theorem.) |
I am using Ubuntu in Windows through VMware software. In windows we have *.exe file to install any software, for Ubuntu how to install google chrome or any software manually, without using Terminal? | How do you install Google Chrome on Ubuntu? |
I'm currently a foreign student holding my resident permit in a Schengen country, and I will go for student exchange next January to another Schengen country. As the exchange duration lasts longer than 90 days, do I need to apply for visa for my stay there? | I’m going to Germany for a semester exchange and I have a long-stay visa from Germany. Can I travel to the other Schengen states during this period with this visa or do I have to apply for a separate short stay Schengen visa? My visa is German national visa type D. It is for a duration of 4 months, i.e., longer than 90 days. It says on the visa that the long stay visa is valid in Deutschland, which is different from my earlier visa, which I had when I visited Germany earlier; that one was a short stay visa and said it was valid in Schengen Staten. Perhaps my current visa means that I can stay in Germany for a period of longer that 90 days can visit the other Schengen states if I don’t exceed the 90 day period. |
I use aliases a lot but right now only for use cases like alias i='sudo apt-get install -y'. I often would like to add an alias in the following form: alias cmd='echo [something] >> /path/to/file' where I would like to substitute [something] with what I enter after the cmd. I can obviously create a one-line script,save it somewhere and make an alias to that command but since I only want to substitute only 1 word in a pipe, is there a simpler way to do this? | For bash script, I can use "$@" to access arguments. What's the equivalent when I use an alias? |
Suppose we have observer $A$ and observer $B$ that meet at a point $p$ when both of their clocks are zero. Why after that, the measure of their clocks would be different, since clocks depend on the laws of physics and the laws of physics are the same for all inertial observers? Shouldn't their clocks click at the same rate? | Please will someone explain what time dilation really is and how it occurs? There are lots of questions and answers going into how to calculate time dilation, but none that give an intuitive feel for how it happens. |
Perhaps I have misunderstood so I ask another question. In Bash desire to expand variables inside read without envsubst, arguments or heredocuments (and without any non shell-builtins) because I work in a shared hosting environment in which I don't have many common non shell-builtin utilities. The variable I want to expand is the environment variable HOME but I make this question variable-agnostic, i.e. I seek a way in which the user can expand inside read: An environment variable A non environment variable Both types of variables I have tried this which failed: IFS= read -r domain_dir ${HOME}/example echo ${domain_dir} Current output: ${HOME}/example Desired output: MY_HOME_DIRECTORY/example How to expand variables inside read without envsubst, arguments or heredocuments (and without any non shell-builtins)? Edit to explain why I find marking this a duplicate is wrong According to the user terdon which marked this question duplicate, in this question I ask for something which is impossible. If terdon is correct in that regard than this question is not a duplicate and can be answered separately with an answer that explains if and why it is indeed impossible. | In a remote CentOS with Bash 5.0.17(1) where I am the only user via SSH I have executed read web_application_root with: $HOME/www or with: ${HOME}/www or with: "${HOME}"/www or with: "${HOME}/www" Aiming to get an output with an expanded (environment) variable such as MY_USER_HOME_DIRECTORY/www. While ls -la $HOME/www works fine, ls -la $web_application_root fails with all examples; an error example is: ls: cannot access '$HOME/www': No such file or directory I understand that read treats all the above $HOME variants as a string (due to the single quote marks in the error) and hence doesn't expand it. How to expand variables inside read? |
when I google my own domain name, I don't even rank for it. Instead, my terms of service page gets indexed and shows up on the second page! My blog shows up here as well (it's hosted by another service) but my main home page and any of it's pages doesn't even appear on the search results. I see the same thing on bing, and yahoo. Main page doesn't show up. the domain name is not too generic but unique enough, it uses .la domain Have I been banned from google? What the hell is going on? The domain is 4 years old and I've done a redesign 4 months ago. | This is a general, community wiki question and answer pair intended to address any questions concerning the reasons a site or specific site contents do not appear in search engine results. If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on . My site (or specific pages on my site) is not appearing in search engine results. Why isn't my content indexed and what can I do about it? |
I am going to Berlin and I have a 10 hours layover in Hongkong.I am having an Indian passport. Can I get a visiting visa and go around Hongkong? How much or what all procedure should I go through to get a visiting visa? Is it possible or advisable to visit the city and come back within 10 hours? | We are (2) Indian nation and travelling from India to USA via Hong Kong airport and about 15 hours layover in Hong Kong airport. Do we need a transit visa even if only changing planes? And can we apply in Hong Kong Airport? |
How do I get the modified date/time of a file in Python? | I have a script that needs to do some stuff based on file creation & modification dates but has to run on Linux & Windows. What's the best cross-platform way to get file creation & modification date/times in Python? |
I have two domains : my-domain.com and my-domain.fr I want to redirect traffic as followed : my-domain.com:80 -> my-domain.com:443 my-domain.fr:80 -> my-domain.com:443 my-domain.fr:443 -> my-domain.com:443 I've chosen to only use .com, am I right ? I guess yes. Because I only have to manage one certificate : the .COM one. My /etc/apache2/sites-available/default : NameVirtualHost *:80 <VirtualHost *:80> ServerName www.my-domain.com ServerAlias my-domain.com Redirect permanent / https://www.my-domain.com </VirtualHost> <VirtualHost *:80> ServerName www.my-domain.fr ServerAlias my-domain.fr Redirect permanent / https://www.my-domain.com </VirtualHost> My /etc/apache2/sites-available/default-ssl : NameVirtualHost *:443 <VirtualHost *:443> ServerName www.my-domain.com ServerAlias my-domain.com DocumentRoot /var/www/my-domain/ ErrorLog /var/log/my-domain/my-domain.com.error.log CustomLog /var/log/my-domain/my-domain.com.access.log combined GnuTLSEnable on GnuTLSPriorities NORMAL GnuTLSExportCertificates on GnuTLSCertificateFile /etc/apache2/ssl/certs/my-domain.com.crt GnuTLSKeyFile /etc/apache2/ssl/private/my-domain.com.key </VirtualHost> <VirtualHost *:443> ServerName www.my-domain.fr ServerAlias my-domain.fr DocumentRoot /var/www/my-domain/ ErrorLog /var/log/my-domain/my-domain.fr.error.log CustomLog /var/log/my-domain/my-domain.fr.access.log combined GnuTLSEnable on GnuTLSPriorities NORMAL GnuTLSExportCertificates on GnuTLSCertificateFile /etc/apache2/ssl/certs/my-domain.fr.crt GnuTLSKeyFile /etc/apache2/ssl/private/my-domain.fr.key </VirtualHost> But I'm getting a SSL certificate error when I'm going to my-domain.fr because it tells me that I wanted to go on my-domain.fr and I'm not. | This is a about Hosting multiple SSL websites on the same IP. I was under the impression that each SSL Certificate required it's own unique IP Address/Port combination. But the is at odds with this claim. Using information from that Question, I was able to get multiple SSL certificates to work on the same IP address and on port 443. I am very confused as to why this works given the assumption above and reinforced by others that each SSL domain website on the same server requires its own IP/Port. I am suspicious that I did something wrong. Can multiple SSL Certificates be used this way? |
I need again your precious help. In particular, I was wondering how to make a first page header. The result that I would like to obtain is something like this: In the picture, I used a word processor, but the title/author layout should be the standard one. Thank you in advance! | I have been racking my brains over how in bloody hell can you have a different header for the title (or first) page of a document. I am not asking here how I can not have a header by clearing the page style for this page using \thispagestyle{plain} or something of the sort but how can I have a different header just for the very first page. Please help as I have a deadline to meet. So far, I have not been able to find anything useful on TeX.SE. Here is some of my code to give you some idea of what I want to achieve: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage[margin=2.5cm]{geometry} \usepackage[utf8]{inputenc} \usepackage{amsfonts} \usepackage{fancyhdr} \usepackage{hyperref} \usepackage{graphicx} \usepackage{csc} \pagestyle{fancy} \fancyhead[L]{**Left Header for all pages**}\fancyhead[R]{**Right Header for all pages**} \lhead{**Left Header for just the first page**} \rhead{**Right Header for just the first page**} \title{Problem Set 1} \author{MyBloodyName} \date{January 31, 2017} \begin{document} \maketitle \newpage Easier? \end{document} |
I'm working with QGIS, v. 2.0.1. I opened a csv-table (from an Excel-file) and now the precision is very high but I don't need this. At the moment the values are for example 15.00000000000000, how can I change this to 2 decimals? And is it possible to set the precision before I open the table in QGIS? The methods suggested by simo just worked partially... I opened the table and it looked good but as I wanted to create a shapefile of the layer the precision switched back to many decimals. What can I do? There are only two decimal places in the csv file and there are also only two decimal places when I load the csv file into QGIS. But as soon as I create a shapefile, there are 14 decimal places. | I have a database in txt format made of several columns of real numbers. Two column are integer, 17 are real (rounded to the first decimal) and 17 are real rounded to the second decimal. If I import it through a txt format QGIS identified the integer columns properly, but also assign a width of 24 and a field precision of 15. How can I limit it? |
How would one calculate the probability of rolling a six (at least once) on seven dice? Would I be correct in proposing $1 - P(\text{no sixes})$ which is $1 - (5/6) ^ 7$? | Could someone help me with how the following is calculated: What is the probability of rolling a die seven times and getting at least one six? My instinct told me it would be $1/6+\cdots + 1/6$ but this ends up being $7/6$. |
I found an example of template's Lyx and I work fine with it, so lets explain what I'm doing: I'm writing a book's intership this later start by 3 chapter wich aren't numerated for example here: if I place my cursor upon the title of chapter the dropdown menu (where we found the section, chapter, section ...) show me chapter not chapter* so the output is: you noticed here we haven't an enumerated chapter for example Chapter 1 Dédicas. in this case is very well. I show ather example but with enumerated chapter in the same document : you look here Chapter 4 but its output will be Chapter1: and if I place again my cursor the dropdown menu show me chapter too. very well too :). but I have a latter chapter that's a general conclusion: I want its output is not enumerated chapter like the above one chapter "Dedecase", its output like this: my problem is I want the later chapter without enumeration, I tried with chapter* but this is not indicated in the Table of Content. for my dropdown menu is: how I can resolve it and thanks. | I use Lyx 2.1, class document : report. I created a general introduction as unnumbered chapter, but at the table of Contents, the introduction does not exist. |
I am a Lebanese citizen and have been issued a multiple entry Schengen visa by the French Embassy. I have not used my visa yet, it is still valid. Is it possible to enter Germany as my first destination? | In case, if I get a multiple-entry Schengen visa in one of the embassies in Ukraine, Kyiv - should my first trip be to the country which issued the visa? Any there any requirements of this sort? Does this condition vary depending on embassy which issued the visa? What are the possible consequences on not visiting that country first? Does it somehow depend on country where the embassy is (i.e. non-Schengen and not EU members)? |
In so-called memes and vines, I've seen sentences such as "People be like", "Boys be like", and so on. Every time, I wondered how be was in those particular sentences. Grammatically, how can be be in such sentences in that way? My assumption, is it like subjunctive [should] be? Are is and are not used because using them would make the sentence determinative, whereas [should] be would make the sentence suggest possibility? Thanks. | Of late, I have been noticing a lot of casual memes floating around, particularly on Facebook, that involve this phrase. Typical constructs could be like the following examples: B*&^%$# be like...I need a break. Niner fans be like...but we won five times! Liberals be like...I hate guns. I understand these are strictly informal constructs. But I'd need a native speaker's (American English because most such memes seem to originate in the US) take on: how casual these phrases are, i.e. if they can be used in semi-formal fiction writing? how this usage originate and if it has any affiliation to a particular dialect group, e.g. Midwest, African-American, Southern American, etc. |
Rendered with 1000 samples in cycles. What can i try to get rid of it without losing the quality of the image? | I know that this question is a bit old or maybe overdone, but I'm running the latest edition of Blender and when I use the Cycles engine I get really fuzzy results and I can't find a simple, non-compromising solution to the quality. I don't know exactly what I'm doing wrong here, but I'm sure others share my frustration. Leaving everything in default settings, I started a new project and switched to the Cycles render. I duplicated the cube and set colors for two Diffuse BSDF shaders, then went ahead and made walls and a floor all sharing the same diffuse shader. I made two windows to emit blue light. The screenshot has gaps between the walls because of the setup: I'm aware that it's considered very incomplete and many have come to terms with some amount of noise, but is this normal? Furthermore, with default settings or not, I can't change the amount of noise produced. Supposedly, using "progressively refine" in the rendering tab should make it refine itself indefinitely, however Cycles only counts to 10 refines and then stops, creating a render which is a pixel-perfect match of the ordinary rendering method when it's completed. I understand that there are tricks that can be used to reduce noise, but at the cost of extra processing time and usually small quality conflicts, like blurring. My question essentially boils down to is this Cycles' current limit? |
So I have a bespoke CMS that allows dynamic creation of forms and lists etc. I have noticed an issue where it grabs the data for the list, which is conflicting with an approval table in the database. The problem is, if the table with the data has fields names the same as field names in the approvals table, then when i mysql_fetch_array and it returns the values in an array, it will only return one field name So an example of what is being returned Array ( [id] => 1 ) And ideally I would want it returned as Array ( [approvals.id] => 1 [affiliates.id] => 2 ) So how can I make it prefix the table name to the results array to counteract field names called the same thing? I dont want to go through changing the field names as its pretty embedded. | I have two tables in my database: NEWS table with columns: id - the news id user - the user id of the author) USERS table with columns: id - the user id I want to execute this SQL: SELECT * FROM news JOIN users ON news.user = user.id When I get the results in PHP I would like to get associative array and get column names by $row['column-name']. How do I get the news ID and the user ID, having the same column name? |
TL;DR: A privilege should be added to be able to "vouch for" another user's usefulness to a particular question, giving them the ability to comment on that question. Sometimes, especially in programming teams, someone who is very familiar with a piece of software may discover or be directed to a question that they are very qualified to solve. Of course, this could also apply to a game developer finding a question about their game on Arqade or a researcher finding a question about their area of expertise on Computer Science.SE. In some cases, this person may have trouble answering the question because they have insufficient reputation to ask for clarification. I propose that we provide a mechanism for another user to vouch for this expert's expertise or ability, which would allow that user to post comments on the question. This should require significantly higher reputation than what is required to comment (I think the "Established user" privilege, at 1000, would be a good spot). Doing this would also not notify the user, to avoid the primary problem with "private message" and "ping" suggestions. Instead, the "vouching" user would have to notify the "expert" user out of band. | I am suggesting a Mentor privilege at 7.5k. It would be on a per-user per-site opt in basis. At some reputation level (perhaps 7.5k) there could be an opt in "mentor" privilege. If someone opts in then when a new user signs up, they become their Mentor. The new user is the Mentee. They will get notified of any posts or suggested edits they make, and can help and support them. While this would by no means help everyone (I'm sure there are more new people signing up than there are 7.5k people willing to help them), it could help mitigate the "new user's bad posts" and such like. By no means would being someone's mentor mean you are the only person who can edit and help them, and you aren't obliged to do so - but if you have opted in then you should help. How would this work? Any Mentor would have no more than 5 active Mentees at once. Once the Mentee gets to 125 rep, the downvote privilege (or any other level deemed sensible) they are no longer a Mentee. If they aren't active for a month, they are no longer a Mentee. If the Mentor has 5 Mentees (i.e. cannot mentor anyone else) then any Mentee not active for 2 weeks is no longer a Mentee. The Mentee can opt out at any time, the Mentor can opt out, but if they opt out a lot (say 5 people in 2 months) they are blocked from the privilege for 2 weeks. The Mentor gets no extra rep. They can still get rep from answering their Mentee's questions and similar. Once the new user gets 20 rep on the site, a chat room is created for them to talk. No user with the association bonus will become a Mentee. This would (maybe) be opt in for sites. For example, this might not be at all useful for this site, or for , but on or I imagine this could be quite good. appears to be asking the same thing, based on the title, but that is asking about people who know each other offline mentoring each other. Every single one of these suggestions (especially the numbers) is open to discussion. Maybe 125 is to low to stop being mentored, or maybe it's too high. What do you think? |
I'm looking to produce a map from two separate maps in R. My Maps files are as follows: #Map1 #Map2 These are 6-10 day weather Precip maps from NOAA. I would like to create a map with the area showing, being only the difference of the two maps. So Map1 - Map2 = Map3. Also, I would like it to show the relative strength of the change for the above or below normal moisture. Which can be seen in the "Prob,N,13,11" & "Cat,C,254" files of the dbf file. Without success I have tried: converting to PolySet and then using joinPolys with the Operation="DIFF". Also: using readOGR, checking for gIsValid, and then trying to use gDifference. When I run the second one I get this error: Error in RGEOSBinTopoFunc(spgeom1, spgeom2, byid, id, drop_not_poly, "rgeos_difference"): TopologyException: no outgoing dirEdge found at -168.86604844949545 63.300706978948405 I am sorry if it seems like such a simple question of taking the difference between two maps but I have been stuck on this question for a number of days now. | A reverse clip saves only the part of your spatial object that is outside the bounds of another object, as opposed to a regular clip which saves the parts that are inside the other object. shows how to do it in ArcMap. How do I do this in R? Reproducible example (on Linux machines): system("wget 'https://github.com/Robinlovelace/Creating-maps-in-R/archive/master.zip' -P /tmp/") unzip("/tmp/master.zip", exdir = "/tmp/master") uk <- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "ukbord") lnd <- readOGR("/tmp/master/Creating-maps-in-R-master/data/", "LondonBoroughs") plot(uk) plot(lnd, add = T, col = "black") What I want here to do is to save all of the UK except for London. Visually, I want the black shape in the resulting image to be a hole. |
I'm struggling to understand how the Chinese remainder theorem works on quadratics (though I know how it works in the simpler cases). For example in my number theory book there's an example with $f(x) = x^{2} + x + 7$ and we need to find all the solutions to $f(x) \equiv 0$ (mod $189$) given that the roots mod $27$ are $4, 13, 22$ and the roots mod $7$ are $0$ and $6$. There's a solution in the book to the example but I can't understand it very well. It says: "...we find that $x \equiv a_{1}$ (mod $27$) and $x \equiv a_{2}$ mod($7$) if and only if $x \equiv 28 \cdot a_{1} - 27 \cdot a_{2}$ (mod $189$)." And then the solution (there are six) follows easily by plugging in the solutions provided in the mod $27$ and mod $7$ cases listed above. But my main struggle is understanding how this equation $x \equiv 28 \cdot a_{1} - 27 \cdot a_{2}$ (mod $189$) was derived, and how to get this equation in general for these problems (I think it involves Chinese remainder theorem and Euclidean algorithm but I can't figure it out). | Given $x^2 - \overline{51}x - \overline{43} = \overline{0}$. Solve it in $\mathbb{Z}/187\mathbb{Z}$. First of all, does the $\overline{x}$ mean that $\overline x = \{x + z \ | z\in I\}$? I am getting really confused, because 187 is composite. I think I should somehow decompose this equation into two equations and solve them in $\mathbb{Z}/11\mathbb{Z}$ and $\mathbb{Z}/17\mathbb{Z}$, but I'm not sure. And what is the pattern to solve things like that? |
I have recently moved into a new home, and for now, I'm stuck with a horrible electric glass top stove. My old place had a gas stove with a continuous grate across the cooking surface. All my pans are carbon steel or cast iron. (I take good care of my pans, so it's not an issue of abuse or putting cold water in a hot pan, or immediately rinsing a hot pan in cold water. With the exception of my woks, they are bullet proof). I am finding that most of my carbon steel pans have a slight warp to the bottom, which was never a problem on the gas range. But is proving to be rather annoying on the new electric one. So in theory is there a way to unwarp or to lessen the warping on the bottom of the pan? In a way this will be academic and I am willing to sacrifice one of my cheaper pans to experiment the unwarping theories. Thanks. | Is there a way to "fix" my stainless steel fry pan that does not sit flush on my cooktop stove? |
I have read that floating numbers are stored as per IEEE 754 representation and sometimes approximate value is displayed if its not possible to represent the number. I have written the following code in which i am extracting fractional part then multiplying it by 10 nine times inside the loop. At the end of the loop the value is 142000000.000000 (variable g). I multiplied it again with 10 outside the loop and got the result as 1419999999.999999. I stored the value which was calculated inside for loop explicitly in another variable(k) and multiplied it with 10 and got the result as 1420000000.000000 Can you please tell me why the difference how it is able to store the value correctly in the second instance (In variable k). #include<stdio.h> #include<math.h> int main() { double f=3.142,g,i; int j; g=modf(f,&i); printf("Inside loop"); for(j=1;j<=9;j++) { g = g * 10.0; printf("\n%lf",g); } printf("\nLoop ends"); g = g * 10.0; printf("\nThe value of g is %lf",g); double k = 142000000.000000; k = k * 10.0; printf("\nThe value of k is %lf",k); } Output Inside loop 1.420000 14.200000 142.000000 1420.000000 14200.000000 142000.000000 1420000.000000 14200000.000000 142000000.000000 Loop ends The value of g is 1419999999.999999 The value of k is 1420000000.000000 | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
When creating a new nested list the following way: test_list = [[""]]*5 unexpected behavior happens, appending to an index the following modifications happens: test_list[1].append(2) [['', 2], ['', 2], ['', 2], ['', 2], ['', 2]] when doing the following it works as I would expect: test_list[1] = test_list[1] + [0] [[''], ['', 0], [''], [''], ['']] but when using the += operator the same odd thing happens test_list[1] += [0] [['', 0], ['', 0], ['', 0], ['', 0], ['', 0]] when the list is defined as following: [[""] for i in range(len(5))] all the examples return the expected output. What is going on? Is it some reference thing I am not understanding? | I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3 The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]] Then I changed one of the innermost values: my_list[0][0] = 5 Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]] which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it? |
I want to show that the function $$ g = \begin{cases} 0, \quad \text{if } x \le 0, \\ e^{-\frac{1}{x^2}}, \quad \text{if } x > 0, \end{cases} $$ is infinitely differentiable at $0$ and that all derivative vanishes: $g^{(n)}(0) = 0$. I was having trouble expanding the function into its Taylor expansion. Any help is appeciated! | $f(x) = \begin{cases} e^{-1/x^2} & \text{ if } x \ne 0 \\ 0 & \text{ if } x = 0 \end{cases}$ so $\displaystyle f'(0) = \lim_{x \to 0} \frac{f(x) - f(0)}{x - 0} = \lim_{x \to 0} \frac {e^{-1/x^2}}x = \lim_{x \to 0} \frac {1/x}{e^{1/x^2}} = \lim_{x \to 0} \frac x {2e^{1/x^2}} = 0$ (using l'Hospital's Rule and simplifying in the penultimate step). Similarly, we can use the definition of the derivative and l'Hospital's Rule to show that $f''(0) = 0, f^{(3)}(0) = 0, \ldots, f^{(n)}(0) = 0$, so that the Maclaurin series for $f$ consists entirely of zero terms. But since $f(x) \ne 0$ except for $x = 0$, we can see that $f$ cannot equal its Maclaurin series except at $x = 0$. This is part of a proof question. I don't think the answer sufficiently proves that any $n$th derivative of $f(x)$ is $0$. Would anyone please expand on the answer? ps: I promise this is not my homework :) |
I'm new to MCMC, so this might be obvious. Let's say we're using MCMC to estimate a posterior distribution. We run MCMC, and it returns a representative sample from that posterior distribution. The sample is just a collection of data points. To actually use it, we just plot a (normalized) histogram of those data points to draw our estimated posterior. However, we also know the posterior probability of each data point in the sample! This is even explicitly calculated in the Metropolis MCMC algorithm. Why do we ignore this? Edit: Here's . | I'm currently estimating parameters of a model defined by several ordinary differential equations (ODEs). I try this with a bayesian approach by approximating the posterior distribution of the parameters given some data using Markov Chain Monte Carlo (MCMC). A MCMC sampler generates a chain of parameter values where it uses the (unnormalized) posterior probability of a certain parameter value to decide (stochastically) whether it will add that value to the chain or add the previous value again. But, it seems to be the practice that the actual posterior probabilities do not need to be saved, rather is a n-dimensional histogram of the resulting parameter values generated and summary statistics like highest density regions (HDRs) of a parameter posterior ditribution is calculated from this histogram. At least that's what I think i learned from . My Question: Wouldn't it be more straightforward to save the posterior probabilities of the sampled parameter values along with these and approximate the posterior distribution from these values and not from the frequencies of parameter values in the MCMC chain? The problem of the burn-in phase would not arise as the sampler would initially still sample low probability regions more often than they would "deserve" by their posterior probabilities but it would not be anymore the problem of giving unduly high probability values to these. |
I'm customizing my zsh PROMPT and calling a function that may or may not echo a string based on the state of an environment variable: function my_info { [[ -n "$ENV_VAR"]] && echo "Some useful information\n" } local my_info='$(my_info)' PROMPT="${my_info}My awesome prompt $>" I would like the info to end on a trailing newline, so that if it is set, it appears on its own line: Some useful information My awesome prompt $> However, if it's not set, I want the prompt to be on a single line, avoiding an empty line caused by an unconditional newline in my prompt: PROMPT="${my_info} # <= Don't want that :) My awesome prompt $>" Currently I work around the $(command substitution) removing my newline by suffixing it with a non-printing character, so the newline isn't trailing anymore: [[ -n "$ENV_VAR"]] && echo "Some useful information\n\r" This is obviously a hack. Is there a clean way to return a string that ends on a newline? Edit: I understand and , but in this question I would specifically like to know how to prevent that behaviour (and I don't think applies in my case, since I'm looking for a "conditional" newline). Edit: I stand corrected: the might actually be a rather nice solution (since prefixing strings in comparisons is a common and somewhat similar pattern), except I can't get it to work properly: echo "Some useful information\n"x [...] PROMPT="${my_info%x}My awesome prompt $>" does not strip the trailing x for me. Edit: Adjusting the proposed workaround for the weirdness that is prompt expansion, this worked for me: function my_info { [[ -n "$ENV_VAR"]] && echo "Some useful information\n"x } local my_info='${$(my_info)%x}' PROMPT="$my_info My awesome prompt $>" You be the judge if this is a better solution than the original one. It's a tad more explicit, I think, but it also feels a bit less readable. | The following code best describes the situation. Why is the last line not outputting the trailing newline char? Each line's output is shown in the comment. I'm using GNU bash, version 4.1.5 echo -n $'a\nb\n' | xxd -p # 610a620a x=$'a\nb\n' ; echo -n "$x" | xxd -p # 610a620a echo -ne "a\nb\n" | xxd -p # 610a620a x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p # 610a62 |
Edited to fix being marked as duplicate or to be more clear on why it appears to be a duplicate. At the time I did not know that package and default where the same thus reason for this post. now I going through exam questions in preparation for my Java exam and I have a question asking me to explain access modifiers and its asking me about a Package modifier. I can find info on private, Protected, public and default but can't find anything on Package. can someone please give me an answer or link me to an article about it? | In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance? |
I live in London and would like to sell a 200 kr. Faroe Islands banknote. This should be worth about £20 by the way. I learn the currency is equivalent to Danish crowns, but none of the UK banks will buy it (hence, I am told by a money changer, that they will not buy it because they cannot sell it onward to a UK bank). There ought to be an easy solution here that doesn't involve me flying to Copenhagen... | I've just returned from several unusual countries in Asia, and annoyingly despite being told I'd have no problem, I'm unable to find anyone in London to change back to pounds. I've tried Travelex in Heathrow, a currency exchange place, and the post office. The currencies include cash from: Mongolia, Kyrgyzstan, Kazakhstan and Uzbekistan. Most of the responses when shown the money is to the tone of "What the hell currency is this?" which doesn't fill me with confidence. Any suggestions welcomed for places that may change this. Otherwise I may need to go back next year ;) |
Let $C\subset \mathbb{R}^m$ be a convex set, let $A$ be an $m \times n$ matrix and $b \in \mathbb{R}^m$. Show that $S=\{x \in \mathbb{R}^n | Ax+b \in C\}$ is a convex set. I can't understand why this set is convex. Take $x,y \in S$ such that $Ax+b \in C$ and $Ay+b \in C$, then it follows that $A((1-λ)+λy)=(1-λ)Ax+λAy$. It would be easy if I can use that $Ax=-b$, because in that case I'd say that $A(1-λ)Ax+λAy=(1-\lambda)(-b)+\lambda(-b)=-b$ and hence convex. Then from the assumption it follows that this set is convex. I am, however, not sure whether I can use that or not. Could anyone give me a hint on this proof? | If $C\subset\mathbb{R}^m$ is a convex set, $A$ is an $m\times n$-matrix and $b\in\mathbb{R}^m$, how do I prove that the set $S=\{x\in\mathbb{R}^m|Ax+b\in C\}$ is convex? I know that the definition of convexity is that all combinations $\lambda x+(1-\lambda)y$ (with $\lambda\in[0,1]$) is in $S$ for pairs $x,y\in S$, but I don't see how to prove this for my $S$. |
This is my code: <p id = "id_2">click</a> <div class = "test_1" id = "id_2" style = "display:none;"> <p>test_div_1</p> </div> <div class = "test_2" style="display:none;"> <p>test_div_2</p> </div> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script> <script type="text/javascript"> $(function(){ $("#id_2").click(function(){ $(".test_1").show() $("body").append("<p id = 'test_p'>test</p>") }); $("#test_p").click(function(){ $(".test_2").show() }); }); </script> basically what I'm trying to do is: when you click <p id = "id_2">click</a> it'll show <div class = "test_1"> and append another paragraph which is what I did here: $("#id_2").click(function(){ $(".test_1").show() $("body").append("<p id = 'test_p'>test</p>") }); and afterwards when you click on the newly appended paragraph <p id = 'test_p'>test</p> it should show another div which should be: $("#test_p").click(function(){ $(".test_2").show() }); but it doesn't. how do we get around this? I'm still trying to wrap my head around web development. I do know that the appended it's temporary because a page refresh would erase it unless the appended data was saved on the server. I wonder if that has anything to do with that?. because facebook's and twitters posting feature is intriguing I know it uses ajax to post the info to the server without a page refresh but how is it able to interact with a div or element that's just been newly appended? | 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 have a doubt regarding the cross validation approach and train-validation-test approach. I was told that I can split a dataset into 3 parts: Train: we train the model. Validation: we validate and adjust model parameters. Test: never seen before data. We get an unbiased final estimate. So far, we have split into three subsets. Until here everything is okay. Attached is a picture: Then I came across the K-fold cross validation approach and what I don’t understand is how I can relate the Test subset from the above approach. Meaning, in 5-fold cross validation we split the data into 5 and in each iteration the non-validation subset is used as the train subset and the validation is used as test set. But, in terms of the above mentioned example, where is the validation part in k-fold cross validation? We either have validation or test subset. I would like to cite this information from https://towardsdatascience.com/train-validation-and-test-sets-72cb40cba9e7 Training Dataset Training Dataset: The sample of data used to fit the model. The actual dataset that we use to train the model (weights and biases in the case of Neural Network). The model sees and learns from this data. Validation Dataset Validation Dataset: The sample of data used to provide an unbiased evaluation of a model fit on the training dataset while tuning model hyperparameters. The evaluation becomes more biased as skill on the validation dataset is incorporated into the model configuration. The validation set is used to evaluate a given model, but this is for frequent evaluation. We as machine learning engineers use this data to fine-tune the model hyperparameters. Hence the model occasionally sees this data, but never does it “Learn” from this. We(mostly humans, at-least as of 2017 😛 ) use the validation set results and update higher level hyperparameters. So the validation set in a way affects a model, but indirectly. Test Dataset Test Dataset: The sample of data used to provide an unbiased evaluation of a final model fit on the training dataset. The Test dataset provides the gold standard used to evaluate the model. It is only used once a model is completely trained(using the train and validation sets). The test set is generally what is used to evaluate competing models (For example on many Kaggle competitions, the validation set is released initially along with the training set and the actual test set is only released when the competition is about to close, and it is the result of the the model on the Test set that decides the winner). Many a times the validation set is used as the test set, but it is not good practice. The test set is generally well curated. It contains carefully sampled data that spans the various classes that the model would face, when used in the real world. I Would like to say this: Taking this into account, we still need the TEST split in order to have a good assement of our model. Otherwise we’re only training and adjusting parameters but never take the model to the battle field Thank you! Check this splitting: | I have a doubt regarding the cross validation approach and train-validation-test approach. I was told that I can split a dataset into 3 parts: Train: we train the model. Validation: we validate and adjust model parameters. Test: never seen before data. We get an unbiased final estimate. So far, we have split into three subsets. Until here everything is okay. Attached is a picture: Then I came across the K-fold cross validation approach and what I don’t understand is how I can relate the Test subset from the above approach. Meaning, in 5-fold cross validation we split the data into 5 and in each iteration the non-validation subset is used as the train subset and the validation is used as test set. But, in terms of the above mentioned example, where is the validation part in k-fold cross validation? We either have validation or test subset. When I refer myself to train/validation/test, that “test” is the scoring: Model development is generally a two-stage process. The first stage is training and validation, during which you apply algorithms to data for which you know the outcomes to uncover patterns between its features and the target variable. The second stage is scoring, in which you apply the trained model to a new dataset. Then, it returns outcomes in the form of probability scores for classification problems and estimated averages for regression problems. Finally, you deploy the trained model into a production application or use the insights it uncovers to improve business processes. Thank you! I would like to cite this information from https://towardsdatascience.com/train-validation-and-test-sets-72cb40cba9e7 Training Dataset Training Dataset: The sample of data used to fit the model. The actual dataset that we use to train the model (weights and biases in the case of Neural Network). The model sees and learns from this data. Validation Dataset Validation Dataset: The sample of data used to provide an unbiased evaluation of a model fit on the training dataset while tuning model hyperparameters. The evaluation becomes more biased as skill on the validation dataset is incorporated into the model configuration. The validation set is used to evaluate a given model, but this is for frequent evaluation. We as machine learning engineers use this data to fine-tune the model hyperparameters. Hence the model occasionally sees this data, but never does it “Learn” from this. We(mostly humans, at-least as of 2017 😛 ) use the validation set results and update higher level hyperparameters. So the validation set in a way affects a model, but indirectly. Test Dataset Test Dataset: The sample of data used to provide an unbiased evaluation of a final model fit on the training dataset. The Test dataset provides the gold standard used to evaluate the model. It is only used once a model is completely trained(using the train and validation sets). The test set is generally what is used to evaluate competing models (For example on many Kaggle competitions, the validation set is released initially along with the training set and the actual test set is only released when the competition is about to close, and it is the result of the the model on the Test set that decides the winner). Many a times the validation set is used as the test set, but it is not good practice. The test set is generally well curated. It contains carefully sampled data that spans the various classes that the model would face, when used in the real world. I Would like to say this: **Taking this into account, we still need the TEST split in order to have a good assement of our model. Otherwise we’re only training and adjusting parameters but never take the model to the battle field ** |
I know that this question has posted few times before but I have a different problem than those one and those answers seem not to work on me. I have installed PyCharm Community 4 few weeks ago, and now I bought a student license (which is free of charge). I now want to install PyCharm Professional by deleting the Community version. Problem is I don't have a separate directory in which I extracted the PyCharm community. I somehow have managed to install it. When I wrote PyCharm in dash home, I am able to execute the program. But for the professional version, case is different. When I run the sudo ./pycharm.sh it doesn't install like it installed Community version. Every time I run pycharm.sh it asks me my license information, which is not permanent. And Professional PyCharm doesn't appear in dash home. How can I permanently remove Community version and can install professional like I wanted? | I have installed Pycharm on Ubuntu 14.04 using useful guide. However the installation is the Community one and I'd like to get the Pro version for which I have a licence. Is there any way to upgrade or is it a case of uninstall and then follow guide which is much more hassle, but compatible with the download available at the Jetbrains site. |
I'm parsing timestamp of event in a log record – 2020-08-09T03:37:33.358874554Z. It looks strange to me and I don't know how correct is it. I don'think that 358874554 describe. I'm trying to parse this example from Python 3.7 like this: dt.datetime.strptime('2020-08-09T03:37:33.358874554Z', "%Y-%m-%dT%H:%M:%S.%fZ") It generates an error: ValueError: time data '2020-08-09T03:37:33.358874554Z' does not match format '%Y-%m-%dT%H:%M:%S.%fZ' How to parse such a datetime correctly? Is this datetime example in log is correct (in terms of ISO or anything)? | I need to parse strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type. I have found in the Python standard library, but it is not very convenient. What is the best way to do this? |
Could not install Java 8 on my ubuntu server 18.04 : sudo add-apt-repository ppa:webupd8team/java sudo apt update sudo apt install oracle-java8-installer Reading package lists... Done Building dependency tree Reading state information... Done Package oracle-java8-installer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'oracle-java8-installer' has no installation candidate How to install Java ? | I have been trying to install the latest version of java-8. However, I found out that the due to changes in the java licence. How should I update my java to 8.0_201 or 8.0_211 now? Thanks! |
I noticed that new posted questions get attention very quickly. If I take some time to read the replies and try myself, new questions often arise. When I edit my original post to add my new questions, I find the updated post is very hard to get attention again, like in . How should I deal with it? The best way I can think of is to open a new post with my new questions, and if necessary there will be a link to my old post. | I asked a question almost as soon as I got my account. I got a few decent answers, but none of them helped solve my problem. The question has long since become buried by newer questions, and there's still no accepted answer. Unfortunately, because there are quite a few answers with votes, to a casual observer it probably looks like the question was answered and I just neglected to mark an answer as accepted, and the system does not consider it "unanswered". Or, I asked a question that was a bit more difficult to answer. After waiting for some time, I received no answers, little or no comments, and only a few views. The question does show up in the "unanswered" list, but no one has answered my question. In either case, what's the protocol for me to try to get this question answered? I see several options: Post the question a second time, possibly linking to the original, to get attention for the original question. This is encouraged on sites like Reddit. However, it's probably not appropriate here, since we're encouraged to check for duplicates and not submit a question that's already been asked by someone else, so this probably falls under that heading. Wait for some kind of wiki-like talk page to be implemented, then post a plea on the talk page for input and hope that activity on the talk page bumps up the question. Edit the question, but do nothing further on the Stack Exchange site. If I edit my post to say that I haven't accepted any of the current answers but am looking for more, then the question might get answered eventually by people browsing through old questions to find something they can answer. Post the question on other sites, but link to my original question on Stack Exchange. People will either answer here, or they'll answer on the other site and I can post the accepted answer here myself. This might be considered spamming, so it might be better to do this without the link. For more information, see the "" page in the . |
My current machine is a Aftershock 65xHP [Intel Core i7-7700HQ] Running on Intel(R) HD Graphics 630 on a Clevo motherboard. I also have an NVIDIA Geforce GTX 1060 graphics card. I tried a few versions of Intel(R) HD Graphics 630 drivers and all of them prevent my Laptop LCD screen from working. (I had to connect to an external monitor via HDMI to view my screen) only 1 version of this graphics driver worked for me. that is - 25.20.100.6519 - dated 1/9/2019 by Intel [See image - ] every now and then, windows update will update this driver and my LCD screen will stop working. All other solutions such as rolling back a driver will not work if I'm away from an external monitor; isn't the point of owning a laptop being able to work without an external monitor? Can someone offer a solution to stop this update? | Is there a way we can disable automatic driver update for a specific device in Windows 10? The updated driver for that device (Intel Management Engine Interface 11.x in particular) causes problems on some laptops during. The version 9.x works perfect. I don't want to disable automatic driver installation for all devices. |
I made a silly typo , but beside that the code works and might be helpful. Better delete the question, auto answer or vote to close it? | Should questions where a problem arose from a typo be closed? Here is a recent example: The problem was a misspelled _gaq (written as _gat). Should these be closed? Surely they're of no use to anyone once the OP recognizes the mistake. If so, what justification should be given? Not a real question? Too localized? Just to be clear, the question linked above actually was not broken due to a typo. This was my mistake, and raises some other interesting questions. See the discussion below. If anyone feels like editing this question with examples of actual typo questions, go for it. |
Do I have to buy minecraft to get a new account on a PC that already has minecraft installed? I am teetering on and off on this question. Searched the web probably 1,000,000,000 times but can't find this specific question's answers. | My son got MineCraft PC for his birthday. The account is under my e-mail and he has a name in the game (my terminology may be off as i do not play the game). My other son would also like to play MineCraft, but have his own name (character???). Can that be done? It doesn't seem logical that I'd have to download 2 Minecraft games. Please let me know how this works. |
I have installed Ubuntu using Crouton and this is the only way I have found. But I would like to have a 100% Ubuntu computer so I can upgrade it with no problems. Has anybody have a link or something where I can find this information? | I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well. Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook? It seems that the Crouton/Ubuntu is not 100% the real thing. The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS. |
My friend lives in a different country but I want to send them a Google Play voucher or send the redeem code via Facebook. Would the redeem code work if she lives in a different country and our currency differs? | I recently found out that there are now Google Play gift cards. Something I've been looking forward to. The downer? It's not available for sale at my country (Philippines). So I want to know, if I get a friend from the US buy a card for me and send me the card code, will I be able to use it on my account that is based in the Philippines? I'm asking this because when I tried going to the , it said it's unavailable for my country and thus, didn't provide me with any way to enter a redeem code. What I have in mind is I would TeamView my friend's PC on the US and log-in my account there then I will top-up my Google Play account that way. The question is, will it work? I mean, won't it detect that I was logging in from the Philippines just awhile ago? I wouldn't want to waste money with buying a gift card if it won't be usable anyway. My friend is an iOS user so I can't just sell it to him either. |
So, I just deleted the XP partition on my hard-drive, and now have 30 Gb of extra space. But that space isnt being used by my Ubuntu file-system, and I'm getting warnings that there is only about 200 Mb of space left, even though I have the empty 300 gb partition So, my question is how do I connect the two partitions and allow Ubuntu to use the 30gb? | 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 entered the USA on a three month visa waiver program from Australia. I am about to return to Australia and would like to come back again to the USA. How long do I have to wait until I can re-enter the USA for another 3 months? | I am currently visiting the USA from the UK (I am a UK citizen) and am intending on staying here for the full 90 days under the Visa Waiver Program. How long would I have to stay out of the US at the end of this period before returning again? Would I have to return to the UK, or could I stay with friends in another country (such as Canada) for a while? |
I was told there is an SQL injection vulnerability in the PHP script that matches 'login' and 'pass' from a backend DB. Edit: Removed code for confidentiality. | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
Here is the question I'm not sure how to proceed with this question. An idea that I have is that I assume that geodisic from l to m is perpendicular to one of the geodisics, then I have to show that the other geodisic is parallel but not sure if that's the right way to proceed and the steps involved. I'd appreciate a hint or any help in proceeding with this. | Let $p < q < r < s$ be real numbers. Let $l$ be the geodesic with endpoints at $p$ and $q$ and let $m$ be the geodesic with endpoints at $r$ and $s$. (a) Prove that there is a unique geodesic segment from $l$ to $m$ that is perpendicular to both. (We sometimes say $l$ and $m$ are ultraparallel since they are not only parallel but they do not share endpoints also.) (b) Now suppose $p < q < r$ are real numbers and $l$ is a geodesic whose endpoints are $p$ and $q$ and $m$ is a geodesic whose endpoints are $q$ and $r$. Then $l$ and $m$ are parallel, but prove that there is not geodesic segment from $m$ to $l$ that is perpendicular to both. That is, unlike the ultraparallel case, there are no points on $l$ and $m$ that realize the shortest distance from $l$ to $m$. |
I have a following wrapper class: public with sharing class HistoryRecordWrapper { Id CreatedById; Datetime CreatedDate; Object Field; Object NewValue; Object OldValue; public HistoryRecordWrapper(AccountHistory accHistory) { CreatedById = accHistory.CreatedById; CreatedDate = accHistory.CreatedDate; Field = accHistory.Field; if(accHistory.NewValue != null || accHistory.NewValue != '') { NewValue = accHistory.NewValue; } if(accHistory.OldValue != null || accHistory.OldValue != '') { OldValue = accHistory.OldValue; } } public HistoryRecordWrapper(ContactHistory conHistory) { CreatedById = conHistory.CreatedById; CreatedDate = conHistory.CreatedDate; Field = conHistory.Field; if(conHistory.NewValue != null || conHistory.NewValue != '') { NewValue = conHistory.NewValue; } if(conHistory.OldValue != null || conHistory.OldValue != '') { OldValue = conHistory.OldValue; } } } Also, I have another class that can combine contact and account history records and that returns list of combined history records. public with sharing class HistoryRecordsHandler { public static List<HistoryRecordWrapper> getAccountAndContactHistoryRecords(Id accId) { List<HistoryRecordWrapper> hrws = new List<HistoryRecordWrapper>(); List<AccountHistory> accHis = [SELECT AccountId, CreatedById, CreatedDate, Field, DataType, IsDeleted, NewValue, OldValue FROM AccountHistory WHERE AccountId = :accId]; List<ContactHistory> conHis = [ SELECT ContactId, CreatedById, CreatedDate, Field, DataType, IsDeleted, NewValue, OldValue FROM ContactHistory WHERE Contact.AccountId = :accId ]; if (!conHis.isEmpty()) { for (ContactHistory conHi : conHis) { HistoryRecordWrapper crs = new HistoryRecordWrapper(conHi); hrws.add(crs); } } if (!accHis.isEmpty()) { for (AccountHistory accHi : accHis) { HistoryRecordWrapper hrs = new HistoryRecordWrapper(accHi); hrws.add(hrs); } } return hrws; } } How can I sort hrws list based on CreatedDate (record that got edited last should be first in the list)? | I have a wrapper class which contains a list of sobjects, i want to have th sorting on the fields of these objects in the wrapper list: The apex code is as follows: Class jobsWrapper { public JobSuite__Job__c job { get; set; } public JobSuite__Job_Task__c jobTasks { get; set; } public JobsWrapper(JobSuite__Job__c objjobs, JobSuite__Job_Task__c objjobTasks) { // if(jobTasks== NULL){jobTasks = new List<Job_Task__c>();} job = objjobs; jobTasks = objjobTasks; } public JobsWrapper() { if(jobTasks== NULL) { jobTasks = new JobSuite__Job_Task__c(); } if(job == NULL) { job = new JobSuite__Job__c(); } } } I want to allow sorting the wrapper list by the fields in the job - like client, jobname, jobnumber etc and fields from the task object as taskname, reviseddue dateetc. How can I do this? Please help, thanks in advance. |
This is a first for me. I've been having trouble upgrading Ubuntu 12.04. How do I fix this? sudo apt-get upgrade: Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 3 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Setting up linux-image-3.8.0-42-generic (3.8.0-42.62~precise1) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.8.0-42-generic Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.8.0-42-generic /boot/vmlinuz-3.8.0-42-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.8.0-42-generic /boot/vmlinuz-3.8.0-42-generic update-initramfs: Generating /boot/initrd.img-3.8.0-42-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.8.0-42-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.8.0-42-generic.postinst line 1010. dpkg: error processing linux-image-3.8.0-42-generic (--configure): subprocess installed post-installation script returned error exit status 2 No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of linux-image-generic-lts-raring: linux-image-generic-lts-raring depends on linux-image-3.8.0-42-generic; however: Package linux-image-3.8.0-42-generic is not configured yet. dpkg: error processing linux-image-generic-lts-raring (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already dpkg: dependency problems prevent configuration of linux-generic-lts-raring: linux-generic-lts-raring depends on linux-image-generic-lts-raring; however: Package linux-image-generic-lts-raring is not configured yet. dpkg: error processing linux-generic-lts-raring (--configure): dependency problems - leaving unconfigured No apport report written because MaxReports is reached already Errors were encountered while processing: linux-image-3.8.0-42-generic linux-image-generic-lts-raring linux-generic-lts-raring E: Sub-process /usr/bin/dpkg returned an error code (1) I have over 2TB of space remaining on the hard drive. I don't understand: gzip: stdout: No space left on device MaxReports is reached already | My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates. After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images? Here is a list of files that are on my /boot partition: :~$ ls /boot/ abi-2.6.31-21-generic lost+found abi-2.6.32-25-generic memtest86+.bin abi-2.6.38-10-generic memtest86+_multiboot.bin abi-2.6.38-11-generic System.map-2.6.31-21-generic abi-2.6.38-12-generic System.map-2.6.32-25-generic abi-2.6.38-8-generic System.map-2.6.38-10-generic abi-3.0.0-12-generic System.map-2.6.38-11-generic abi-3.0.0-13-generic System.map-2.6.38-12-generic abi-3.0.0-14-generic System.map-2.6.38-8-generic boot System.map-3.0.0-12-generic config-2.6.31-21-generic System.map-3.0.0-13-generic config-2.6.32-25-generic System.map-3.0.0-14-generic config-2.6.38-10-generic vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic vmcoreinfo-3.0.0-12-generic extlinux vmcoreinfo-3.0.0-13-generic grub vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic vmlinuz-3.0.0-14-generic Currently, I'm using the 3.0.0-14-generic kernel. |
is it currently possible to enter sweden for a non EU / EEA citizen with a UK work permit visa? this is for a short holiday. edit: the type of visa is a work permit / residence visa, not a temporary visa as referenced in other questions. i.e. the person is living and working in the uk, and has a visa sponsored by their employer in the UK | I'm a UK passport holder; my wife isn't. We don't live in UK. If she gets a UK visit visa, does this entitle her to travel to the Schengen area or do I need to get her a separate Schengen visa? |
Is it only necessary a human consciousness? A measurement device? Can it be said that any of them cause the wave function collapse? | My question is not about (pseudo) philosophical debate; it concerns mathematical operations and experimental facts. What is an observer? What are the conditions required to be qualified of observer, both mathematically and experimentally? |
Hi I have written a GSP and Javascript code to perform on click remove file functionality. JavaScript code function remove(attachmentId) { $(document).ready(function(){ $('.glyphicon-remove').click ( function(e){ e.preventDefault(); $(this).parent().parent().remove(); $.ajax({ url: "${g.createLink(controller: "landing", action: "deleteSelectedFile")}", data: { attachmentId: attachmentId }, success: function(data){ alert("Success"); } }); }); }); } GSP Code <g:each in="${fileList}" var="file"> <div> <a href="#" onclick="remove('${file.attachmentId}')"> <span class="glyphicon glyphicon-remove"></span></a> <a href="/forms/landing/attachment/${file.attachmentId}" >${file.name}</a> </br> </div> </g:each> Groovy Code def deleteSelectedFile() { String attachmentId= params.attachmentId activitiService.deleteAttachemnt(attachmentId) } I am not getting why exactly it is taking double click for deleting the first record. Please help me. Note: Application is running in Internet Explorer. | 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 have been working on some code for a while. And I had a question: What's the difference among casting, parsing and converting? And when we can use them? | In Jesse Liberty's Learning C# book, he says "Objects of one type can be converted into objects of another type. This is called casting." If you investigate the IL generated from the code below, you can clearly see that the casted assignment isn't doing the same thing as the converted assignment. In the former, you can see the boxing/unboxing occurring; in the latter you can see a call to a convert method. I know in the end it may be just a silly semantic difference--but is casting just another word for converting. I don't mean to be snarky, but I'm not interested in anyone's gut feeling on this--opinions don't count here! Can anyone point to a definitive reference that confirms or denies if casting and converting are the same thing? object x; int y; x = 4; y = ( int )x; y = Convert.ToInt32( x ); Thank you rp Note added after Matt's comment about explicit/implicit: I don't think implicit/explicit is the difference. In the code I posted, the change is explicit in both cases. An implicit conversion is what occurs when you assign a short to an int. Note to Sklivvz: I wanted confirmation that my suspicion of the looseness of Jesse Liberty's (otherwise usually lucid and clear) language was correct. I thought that Jesse Liberty was being a little loose with his language. I understand that casting is routed in object hierarchy--i.e., you can't cast from an integer to a string but you could cast from custom exception derived from System.Exception to a System.Exception. It's interesting, though, that when you do try to cast from an int to a string the compiler tells you that it couldn't "convert" the value. Maybe Jesse is more correct than I thought! |
While I intend to change the font of only a line in the document using one of the fonts presented in the LaTeX Font Catalogue () (for example, concmath: ), but the font of the whole of document will be changed. I do as follows: \usepackage{concmath} \usepackage[T1]{fontenc} \newenvironment{concmath}{\fontfamily{concmath}\selectfont}{\par} \begin{document} The font of this text must be remained as it is by default. \begin{concmath} I want to change only the font of this line using one of the fonts in The LaTeX Font Catalogue. \end{concmath} The font of this text must be remained as it is by default. \end{document} P.S. I am using LNCS as template and TeXstudio as editor. | The standard font packages make global changes to the fonts in my document. What if I want to use a particular font for just a portion of my text? How do I find the right name of the font? How do I select the font? How do I restrict the scope of the font change? There are separate answers for different flavors of TeX (quick links): |
Whenever I go to the applications view I now see two separate taskbars. My Dash to Dock and some other one. Idk if it is Ubuntu dock, but when I went to GNOME Tweaks, that extension appeared to be off. Is there a terminal command I could do to fix this. Ubuntu 18.04.2 LTS. | What's going on here? I've installed the on Ubuntu 17.10. Everything was cool, and as I was trying to hone and tweak the look of my desktop, at some point the shortcuts bar (dock?) on the left is duplicated. (Click image to enlarge) The default, which normally disappears with Dash to Dock, is there underneath the one that usually shows up when I install Dash to Dock. Why? I've tried to go through the options for Dash to Dock, the GNOME Tweak Tool, and the regular Ubuntu settings, but I can't figure it out. |
I'd like to find all xml files containing 'foo', but not containing 'bar'. The command I've put together looks like this: find -iname "*.xml" -print0 | xargs -0 grep -FlisZ "foo" | xargs -0 grep -Flisv "bar" However the final grep command doesn't seem to exclude files that contain 'bar'. Have I chained the commands correctly? p.s. I know this can be written in many different ways (and probably a single grep command). However I'm interested in why my chaining is broken. p.p.s The filenames contains spaces (hence the -print0 in find, the -0 in xargs and the -Z in grep) | What concise command can I use to find all files that do NOT contain a text string? I tried this (using -v to invert grep's parameters) with no luck: find . -exec grep -v -l shared.php {} \; Someone said this would work: find . ! -exec grep -l shared.php {} \; But it does not seem to work for me. has this example: find ./logs -size +1c > t._tmp while read filename do grep -q "Process Complete" $filename if [ $? -ne 0 ] ; then echo $filename fi done < t._tmp rm -f t_tmp But that's cumbersome and not at all concise. ps: I know that grep -L * will do this, but how can I use the find command in combination with grep to excluded files is what I really want to know. pss: Also I'm not sure how to have grep include subdirectories with the grep -L * syntax, but I still want to know how to use it with find :) |
The or statement in the first line of my if statement is not working as i would expect it to, any suggestions? if(answer == "deposit" || "Deposit"){ System.out.println("How much would you like to deposit?"); final int deposit = console.readInt(); account.deposit(deposit); System.out.println( "This leaves you with $" + formatter.format(account.getBalance()) + " in your account"); }else if(answer == "Check Balance"){ System.out.println( "You have $" + formatter.format(account.getBalance()) + " in your account"); }else if(answer == "Withdraw"){ System.out.println("How much would you like to take out?"); final int with = console.readInt(); account.withdraw(with); System.out.println( "This leaves you with $" + formatter.format(account.getBalance()) + " in your account"); }else{ System.out.println("You didn't enter a correct term, please try again."); } | I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference? |
I want to make an animation of a blob of ink flowing down and then shaping into text. What js libraries can I use. On my research the only way i could find to do this was SVG with GSAP js library. Is there any other way to do it. Thanks | I have a couple of illustrations done in Illustrator and I am planing to animate it for a website that I am working on, I've heard of toolkit with flash, but is it the best way to go or is there another "better" way of doing it? Here's an example of the kind of animations I am aiming for: |
What is the back-propagation algorithm and how does it work? | I got a slight confusion on the algorithm used in (MLP). The error is adjusted by the cost function. In backpropagation, we are trying to adjust the weight of the hidden layers. The output error I can understand, that is, e = d - y [Without the subscripts]. The questions are: How does one get the error of hidden layer? How does one calculate it? If I backpropagate it, should I use it as a cost function of an adaptive filter or should I use a pointer (in C/C++) programming sense, to update the weight? |
I need to include animate package in my text. When I tried that, I got an error: LaTeX Error: File `l3backend-pdfmode.def' not found. So after that I also inserted package l3backend into my preamble, which is: \documentclass{beamer} \usepackage{l3backend} \usepackage{amsmath}% \usepackage{amsfonts}% \usepackage{amssymb}% \usepackage{yfonts} \usepackage{mathtools} \usepackage{mdwlist} \usepackage{stackengine} \usepackage{pdfpages} \usepackage{graphicx} \usepackage{bibentry} \usepackage{booktabs} \usepackage{animate} but it still does not work, I have the same error: ​! LaTeX Error: File `l3backend.sty' not found. Please can anybody help me? I am working in Texmaker, using the most recent version 5.0.4. | I updated my TeXlive distribution a couple times in the past week, and now I get this error when I include package expl3 (or any other package that includes it, such as fontspec). Before the updates it was working fine. Am I missing any package that should be installed? I tried searching for l3backend-pdfmode.def, but I found no results. \documentclass{article} \usepackage{expl3} \begin{document} Hi \end{document} λ lualatex a This is LuaTeX, Version 1.10.0 (TeX Live 2019) restricted system commands enabled. (./a.tex LaTeX2e <2018-12-01> luaotfload | main : initialization completed in 0.042 seconds (/opt/texlive/2019/texmf-dist/tex/latex/base/article.cls Document Class: article 2018/09/03 v1.4i Standard LaTeX document class (/opt/texlive/2019/texmf-dist/tex/latex/base/size10.clo)) (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3.sty (/opt/texlive/2019/texmf-dist/tex/latex/l3kernel/expl3-code.tex) ! LaTeX Error: File `l3backend-pdfmode.def' not found. Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: def) Enter file name: ! Emergency stop. <read *> l.282 } 379 words of node memory still in use: 2 hlist, 1 rule, 1 dir, 3 kern, 1 glyph, 4 attribute, 48 glue_spec, 4 attrib ute_list, 1 write nodes avail lists: 2:9,3:3,4:1,5:2,7:2,9:2 ! ==> Fatal error occurred, no output PDF file produced! Transcript written on a.log. |
I am running into below error at line tblSoftwareImageTestPlan.SoftwareImageTestPlanID = SoftwareImageTestPlanData.SoftwareImageTestPlanID,how can I fix this error? public List<SoftwareImageTestPlan> AddSoftwareImageRecord(IEnumerable<SoftwareImageTestPlan> SoftwareImageTestPlans_WithParticularSoftwareImageID) { tblSoftwareImageTestPlan SoftwareImageTestPlan = new tblSoftwareImageTestPlan(); foreach (var SoftwareImageTestPlanData in SoftwareImageTestPlans_WithParticularSoftwareImageID) { tblSoftwareImageTestPlan.SoftwareImageTestPlanID = SoftwareImageTestPlanData.SoftwareImageTestPlanID;//error at line } return null; } Error: An object reference is required for the non-static field,method,or property 'tblSoftwareImageTestPlan.SoftwareImageTestPlanID' | Consider: namespace WindowsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { //int[] val = { 0, 0}; int val; if (textBox1.Text == "") { MessageBox.Show("Input any no"); } else { val = Convert.ToInt32(textBox1.Text); Thread ot1 = new Thread(new ParameterizedThreadStart(SumData)); ot1.Start(val); } } private static void ReadData(object state) { System.Windows.Forms.Application.Run(); } void setTextboxText(int result) { if (this.InvokeRequired) { this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result }); } else { SetTextboxTextSafe(result); } } void SetTextboxTextSafe(int result) { label1.Text = result.ToString(); } private static void SumData(object state) { int result; //int[] icount = (int[])state; int icount = (int)state; for (int i = icount; i > 0; i--) { result += i; System.Threading.Thread.Sleep(1000); } setTextboxText(result); } delegate void IntDelegate(int result); private void button2_Click(object sender, EventArgs e) { Application.Exit(); } } } Why is this error occurring? An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int) |
I'm working with LeapMotion. I have this code in my main class: public void onFrame(Controller controller) { Frame frame = controller.frame(); GestoPistola gesto; if (!frame.hands().isEmpty()) { System.out.println("ENTER"); gesto.reconocer(frame); } … } And then, this is the class GestoPistola, which is the one that has to make all the job. public class GestoPistola { public enum ESTADO{ DESCARGADA, CARGADA } ESTADO _estado; public void GestoPistola(){ _estado = ESTADO.DESCARGADA; } public void reconocer(Frame f) { System.out.println("LET'S START"); if (!f.hands().isEmpty()) { System.out.println("Hay mano"); Hand hand = f.hands().get(0); FingerList fingers = hand.fingers(); switch(_estado) { … } } } } So, the consol shows "ENTER", but never "LET'START". I know it's a really simple question, but I'm not such an expert with JAVA. Hope someone can help me! | 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? |
w command displays useful information about where users come from and what are they doing. A example of its output is: ~ $ w -V procps version 3.2.8 ~ $ w 13:53:14 up 164 days, 3:12, 5 users, load average: 0.00, 0.01, 0.00 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root tty1 - 06Aug13 56:38 0.11s 0.11s -bash amp pts/0 a89-153-189-213. 11:30 17.00s 0.13s 0.13s -bash rafael pts/4 gwec.di.uminho.p 11:59 0.00s 0.80s 0.00s w But this output truncates the hostname in the "FROM" field, is there a way yo discover the entire hostname/IP address? | Sorry my knowledge of Linux bash commands is pretty basic, I've been searching for a while but I'm not 100% sure what I need to search for. I was wondering if there's a way to grab the current logged in users remote host name in a Linux bash script? I have a script in which I need to log each time a user runs it. I'm obtaining the date like so: cdat=`/bin/date +%a' '%d' '%h' '%Y', '%H':'%M`; I now need to add the users remote host (not the username they logged in with). I'm not 100% sure I'm using the right terminology here either, just to clarify; by 'remote host name' I mean the same output that prints on the screen on most servers I've logged into over ssh, for example: Last login: Mon Jul 22 16:35:09 2013 from win7-i7-stuart.my.domain.com I'm looking for the win7-i7-stuart.my.domain.com bit. |
Is this sentence formal? If I was given more time, I would have less pressure Why do we use "I was" rather than "I were"? | If I was... If I were... When is it correct to use "If I was" vs. "If I were" in standard English? |
I read that Alan Guth used phase transition model of early universe to dilute the monopole so that nowadays we don't get to see any of them? I know there is no monopole in nature but I am interested to know how the inflation upset the grand symmetry? | Cosmological Inflation was proposed by Alan Guth to explain the flatness problem, the horizon problem and the magnetic monopole problem. I think I pretty much understand the first two, however I don't quite understand how a period of exponential expansion fully explains monopole problem. From Weinburg's Cosmology, the issue is essentially that various grand unified theories predict that the standard models $SU(3)\times SU(2)\times U(1)$ arose from the breaking of an original simple symmetry group. For many of these theories, a crazy particle known as a "magnetic monopole" is created at a certain energy (sometimes quoted at around $M = 10^{16} GeV$). So my question is why does a period of rapid expansion somehow or other result in a low density of magnetic monopoles (assuming they exist/existed at all)? I would think, like in nucleosynthesis, that the primary factor in monopole creation is energy density, and since inflation is still a "smooth" process, at some point the universe would hit the proper energy density to create magnetic monopoles. How does the rate of expansion at the time they were created effect overall present density? |
Need help to understand the output of ls -l command. I created one file testa in my home directory. When I run the ls -l command it shows up with two similar names. What does the symbol (~) mean with the file "testa". Below is the sample output: testa testa~ | In Windows, I believe that files with a tilde in the file name represent files that are currently open in an application. For example, Microsoft Word creates a file with almost the same name as the file you currently have open, but with a tilde in the name. It's icon is also partially faded. As far as I'm aware, this signifies a temporary file that exists in case the application crashes and you didn't get a chance to save your file, or to allow the original file to remain unlocked by the file system and accessible to other applications. In Linux, I ran into a *.log file with a tilde at the end of the file name (scan.log~). Does that mean the log file is currently open in another application that is potentially writing to it? |
I have a project which aggregates public information on companies, startups, founders etc. for a total of >2 million tracked entities worldwide. Yes, every single page is high quality, manually curated and vetted as much as possible to provide the best value to the customer. Trouble is, google is only crawling my website at the rate of 300 pages/day. That's 109.5K pages per year. At this rate, Google will never index my entire website. To reiterate, I have over 2 million pages I'd like to get indexed. Here's what I've done so far: Squeezed out every bit of performance, so that Googlebot has more 'compute quota' to spend on my site Ensured high quality SEO to signal that yes this is a good website google, come and crawl please. Ensured high user value, again, I've made sure it is a good website that provides a valuable service and I'm seeing high CTRs/low bounce rates even at positions of 15+. My website is two months, and only about 15k pages are indexed till now. I know this problem can be solved. If you google any of these: site:crunchbase.com site:owler.com site:zoominfo.com (which are my competitors), they have literally tens of millions of pages indexed. Forget competing, right now I'm just fighting for a seat at the table. How to increase my indexing rate? I need something far higher than 300 pages/day, as much as possible really. (For reference, 100k pages/day would still take 20 days to scan my whole website) (P.S: If anyone wants, I can link to the website here) | We are currently developing a site that currently has 8 million unique pages that will grow to about 20 million right away, and eventually to about 50 million or more. Before you criticize... Yes, it provides unique, useful content. We continually process raw data from public records and by doing some data scrubbing, entity rollups, and relationship mapping, we've been able to generate quality content, developing a site that's quite useful and also unique, in part due to the breadth of the data. It's PR is 0 (new domain, no links), and we're getting spidered at a rate of about 500 pages per day, putting us at about 30,000 pages indexed thus far. At this rate, it would take over 400 years to index all of our data. I have two questions: Is the rate of the indexing directly correlated to PR, and by that I mean is it correlated enough that by purchasing an old domain with good PR will get us to a workable indexing rate (in the neighborhood of 100,000 pages per day). Are there any SEO consultants who specialize in aiding the indexing process itself. We're otherwise doing very well with SEO, on-page especially, besides, the competition for our "long-tail" keyword phrases is pretty low, so our success hinges mostly on the number of pages indexed. Our main competitor has achieved approx 20MM pages indexed in just over one year's time, along with an Alexa 2000-ish ranking. Noteworthy qualities we have in place: page download speed is pretty good (250-500 ms) no errors (no 404 or 500 errors when getting spidered) we use Google webmaster tools and login daily friendly URLs in place I'm afraid to submit sitemaps. Some SEO community postings suggest a new site with millions of pages and no PR is suspicious. There is a , too, in order to avoid increased scrutiny (at approx 2:30 in the video). Clickable site links deliver all pages, no more than four pages deep and typically no more than 250(-ish) internal links on a page. Anchor text for internal links is logical and adds relevance hierarchically to the data on the detail pages. We had previously set the crawl rate to the highest on webmaster tools (only about a page every two seconds, max). I recently turned it back to "let Google decide" which is what is advised. |
I am trying to install gcc (in order to install postGIS later), but i have the folowing problem (you can see in the picture). Can anyone help? | After upgrading from 10.04 to 12.04 I am trying to install different packages. For instance ia32-libs and skype (4.0). When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message. Output of commands: sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. After running this: sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. |
I am learning a bit of .NET and handlebars, need some help figuring out how to deal with JSON date parsing in this case: Method in my controller public JsonResult stats() { IQueryable<EnrollmentDateGroup> data = from student in db.Students group student by student.EnrollmentDate into dateGroup select new EnrollmentDateGroup() { EnrollmentDate = dateGroup.Key, StudentCount = dateGroup.Count() }; return Json(data.ToList()); } Template using handlebars <script id="mytemplate" type="text/x-handlebars-template"> <h3 style="margin-top:20px">Student Body Statistics</h3> <table> <tr> <th>Enrollment Date</th> <th>Students</th> </tr> {{#each this}} <tr> <td>{{{EnrollmentDate}}}</td> <td>{{{StudentCount}}}</td> </tr> {{/each}} </table> </script> JavaScript <script type="text/javascript"> (function () { var templateHtml = $("#mytemplate").html(); var sourceHtml = Handlebars.compile(templateHtml); $.post("@Url.Action("stats")", "", function (data) { $('#stu').html(sourceHtml(data)); console.log(data); }, "json"); })(); </script> and my result coming from DB into data is a list of /Date(1125547200000)/ How can I parse this date to real date? | I'm taking my first crack at with jQuery. I'm getting my data onto my page, but I'm having some trouble with the JSON data that is returned for Date data types. Basically, I'm getting a string back that looks like this: /Date(1224043200000)/ From someone totally new to JSON - How do I format this to a short date format? Should this be handled somewhere in the jQuery code? I've tried the jQuery.UI.datepicker plugin using $.datepicker.formatDate() without any success. FYI: Here's the solution I came up with using a combination of the answers here: function getMismatch(id) { $.getJSON("Main.aspx?Callback=GetMismatch", { MismatchId: id }, function (result) { $("#AuthMerchId").text(result.AuthorizationMerchantId); $("#SttlMerchId").text(result.SettlementMerchantId); $("#CreateDate").text(formatJSONDate(Date(result.AppendDts))); $("#ExpireDate").text(formatJSONDate(Date(result.ExpiresDts))); $("#LastUpdate").text(formatJSONDate(Date(result.LastUpdateDts))); $("#LastUpdatedBy").text(result.LastUpdateNt); $("#ProcessIn").text(result.ProcessIn); } ); return false; } function formatJSONDate(jsonDate) { var newDate = dateFormat(jsonDate, "mm/dd/yyyy"); return newDate; } This solution got my object from the callback method and displayed the dates on the page properly using the date format library. |
1GB memory, 90% free 70GB HDD 7200rpm, Intel Celeron (P) 330 2.66 GHz 533 FSB installed Ubuntu 14.04.1 LTS 32 bit. It is slower than prior Windows XP 32bit OS. what is wrong? may I improve performance? | What are your tips for improving overall system performance on ubuntu? Inspired by this I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster. This is not meant to be application specific (e.g. make firefox load pages faster), but system wide. Preferably 1 tip per answer, with enough detail for people to implement it. A couple of mine would be: Install (via Software Center or sudo apt-get install preload); Change value - "which controls the degree to which the kernel prefers to swap when it tries to free memory"; What are yours? PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box. |
I have a directory structure like this file 1.ext1 file 1.ext2 file 1.ext3 file 2.temp.ext1 file 2.ext2 file 3.ext1 I want to create each subfolder and move each file name no matter what extension there file 1\file 1.ext1 file 1\file 1.ext2 file 1\file 1.ext3 file 2\file 2.temp.ext1 file 2\file 2.ext2 file 3\file 3.ext1 any easy way to do it? thanks | I have some files with different extensions such as *.pdf, *.mp3, *.jpg and a few others. All of them are stored in a parent directory. How can I get a list of all extensions, create some folders based on these extensions and then move all files into their relevant folders? |
I am not able to assign a particular C# script to a game object. When I try to do so, I get this error as shown below Only the script I have is different. In brief, just like the error above I am getting it as Can't Add Script Component 'AIWaypointNetwork' because the script class cannot be found. Make sure that there are no compile errors and that the file name and the class name match And when I try to create a script component, I get the warning Associated Script cannot be loaded. Please fix compile errors and assign a valid script. Here is a screenshot of the situation. As far as I know, I don't see anything wrong with the script and it's pretty simple too. using System.Collections; using System.Collections.Generic; using UnityEngine; public class AIWaypointNetwork : MonoBehaviour { public List<Transform> Waypoints = new List<Transform>(); } The unity version that I am using right now is Version 2020.1.11f1 Personal. And I have not faced these types of errors before. Based on my search, I see that I would probably have to reimport assets over again. How do we do that in this version of unity? Is there something else I am missing here? | I keep getting the following error when i try to drag and drop a script to my gameobject: I have made sure that both my Script name and the class name is : Soldier as you can see: public class Soldier : MonoBehaviour { public int Rank; } So my question is what have i done wrong? |
The plural of mouse is mice, and the plural of louse is lice. Why is the plural form of house not hice? According to , the word house is already longer in the language, just as mouse and louse, so it is not because it is a foreign word (loanword). This question was marked to be a duplicate of and , but it is actually a duplicate of neither since they handle different words, and also different causes. | Why is it that the plural of goose is geese but the plural of moose is moose? The same goes for mouse and house. Mouse becomes mice, yet house becomes houses. |
How can I prove that any regular surface with non zero mean curvature is orientable? UPDATE: The surface is embedded in $\mathbb{R}^3$. | Let $M$ be a surface in $\Bbb R^3$ with non-zero mean curvature for every point. How could I show that this implies that $M$ is orientable? By our definition, orientable means that an unitary, normal vector can be defined continuously for every point in the surface. This is a homework question, so just hints would be appreciated :) |
I have a sharepoint 2013 list. When the user clicks on edit this list to open it in a datasheet view...after making changes when clicked on stop ,the data should be saved and redirect to another page. Is this possible? Thanks in advance | What is the best way to add redirect function into the save button on a newform in SharePoint 2013. When the user create a list item, he/she should be redirected to another form. Is it possible to get and parse the new generated item ID? Start - Newform URL: End - Editform URL: Thanks |
A sample dataset would be: ArrayList<String> a = new ArrayList<String>(); a.add("5"); a.add("10.5a"); a.add("4"); a.add("4c"); a.add("4a"); a.add("10.6a"); a.add("3"); I'm looking for the output to be in the format of [3, 4, 4a, 4c, 5, 10.5a, 10.6a]. Java's sorting function (Collections.sort(a);) sorts the data set to [10.5a, 10.6a, 3, 4, 4a, 4c, 5]. So, I need a way to split the value of the number from the letter, and sort first by number(4 before 10) then by letter with a number coming before a number-letter (4 before 4a). The main way this is different from other questions on stackoverflow is that there is no separator between the numeric and alphabetic characters- the strings cannot be split at a specific character. The returns [3, 4, 4a, 4c, 5, 10.6a, 10a, 10b]- the 10.6a should come after 10a. Solved In the first few lines, change the first int from 48 to 46, which accepts the "-" and "." characters as digits when separating the numbers from letters. It also makes it so numbers can now have decimals and be negative with the caveat that if your data uses .'s or -'s as non-numerical characters it will mess up the results. public class AlphanumComparator implements Comparator<String> { private final boolean isDigit(char ch) { return ch >= 46 && ch <= 57; | I need to write a Java Comparator class that compares Strings, however with one twist. If the two strings it is comparing are the same at the beginning and end of the string are the same, and the middle part that differs is an integer, then compare based on the numeric values of those integers. For example, I want the following strings to end up in order they're shown: aaa bbb 3 ccc bbb 12 ccc ccc 11 ddd eee 3 ddd jpeg2000 eee eee 12 ddd jpeg2000 eee As you can see, there might be other integers in the string, so I can't just use regular expressions to break out any integer. I'm thinking of just walking the strings from the beginning until I find a bit that doesn't match, then walking in from the end until I find a bit that doesn't match, and then comparing the bit in the middle to the regular expression "[0-9]+", and if it compares, then doing a numeric comparison, otherwise doing a lexical comparison. Is there a better way? Update I don't think I can guarantee that the other numbers in the string, the ones that may match, don't have spaces around them, or that the ones that differ do have spaces. |
I have been studying enumerative combinatorics using the book by George Martin: Counting: the art of enumerative combinatorics. I would like to continue learning the subject, but the problem is that I have found with two types of books: either they're too problem-approached (Chen and Koh: Principles and techniques in combinatorics), or rather too technical (Stanley: Enumerative combinatorics vol. 1). I am looking for an applied approach (but if it is mathematically oriented it is nice also). It would be nice if they have correct answers (I have been dissapointed by such good books like Charalambos: Enumerative combinatorics, or Tucker: Applied combinatorics which contain a bunch of errata). EDIT: Found this: | I'm currently attending a somewhat disorganized seminar on combinatorics that follows no textbook. So far we have covered the orbit-stabilizer theorem, some recursion, and we're heading into the Möbius inversion formula. Can anyone suggest a text that approaches combinatorics at this level for a 2nd-3rd year undergrad who already knows some algebra and the more basic combinatorics like combinations, permutations, stars-and-bars, generating functions? Most introductory combinatorics books I've found are more suited to a discrete math class and cover stuff which I already know. I'm looking for something to supplement this lecture. Thank you. |
I run dkimproxy to sign outbound email and verify inbound email. Since a while, I am experiencing the following permanent problem. The dkimproxy service is unable to query the DNS. Each and every message I receive gets the following header set (in my example I am example.org and sender example.biz) Authentication-Results: mail.example.org; dkim=invalid (public key: DNS query timeout for api._domainkey.example.biz at /usr/lib/perl5/vendor_perl/5.18.1/Mail/DKIM/DNS.pm line 156, line 643.) [email protected]; dkim=invalid (public key: DNS query timeout for api._domainkey.example.biz at /usr/lib/perl5/vendor_perl/5.18.1/Mail/DKIM/DNS.pm line 156, line 643.) [email protected] The error is permanent. If I log in via SSH and try to use nslookup to get the TXT record from the remote DNS I can successfully read it. How can I fix the above problem? [Edit] my problem doesn't fall into this , because in that question the DKIM check seems to be done by SpamAssassin. I check DKIM with dkimproxy | I run my own mail server on an Azure Linux VM with Postfix. Since I was under heavy spam attack I reinforced my mail server security measures. Without going into the security things, today I noticed something particularly unusual. Postfix was not getting mail from some well known domains. Only some # /var/log/mail postfix/smtpd[40702]: NOQUEUE: reject: RCPT from xxxx.ing.net[xx.xx.xx.xx]: 451 4.3.5 <[email protected]>: Sender address rejected: Server configuration problem; from=<[email protected]> to=<xxxxxxxxxx> proto=ESMTP helo=<xxxx.ing.net> # /var/log/warn postfix/smtpd[32944]: warning: problem talking to server private/spf-policy: Connection timed out What I dumbly did was to ping for SPF record on ing.com / ing.net From my Windows box nslookup ing.com Server: [8.8.8.8] Address: 8.8.8.8 Risposta da un server non autorevole: ing.com text = "MS=ms77059065" ing.com text = "v=spf1 include:_spf.ing.net ip4:91.209.197.6 ip4:89.20.160.55 ip4:78.136.53.254 ip4:95.138.135.251 ip4:92.52.81.2 ip4:146.148.26.249 ip4:83.231.160.132 ip4:83.231.160.128/26 ip4:212.187.169.64/26" " include:_spf_mx.solvinity.com include:mailplus.nl ip4:24.157.48.85 ip4:141.155.214.85 ip4:160.34.64.28 ip4:192.254.112.185 ip4:118.127.87.207 ip4:128.242.118.200 ip4:62.73.172.35 ip4:83.217.248.35 ip4:91.209.197.7 -all" ing.com text = "adobe-idp-site-verification=8b81f7b92ccac0b65bab7d47f9fcecaeda6f04ac870b79133d8ac54be7b53534" ing.com text = From the email server box nslookup > nslookup > set type=txt > ing.com ;; Truncated, retrying in TCP mode. From mail server box setting the DNS server to 8.8.8.8 returns the same SPF payload. Question is: what is causing this issue with TXT DNS resolution in Azure VM? Before blindly changing the system DNS settings, I would like to understand the error and its cause, and why happening only on Azure default DNS |
I have data which is coming from a sql query which has lots of joins and conditions attached to it, now there are few columns where i want to bring the values of those columns as comma separated so it should not duplicate the row i do not get if i had to write all joins in it and use stuff to get that values. or how can i use it, do i need to create a temporary table to it, need some advice and if possible a practical example will help | I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life). In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently. group_concat, by the way, does this: given a table of, say, employee names and projects... SELECT empName, projID FROM project_members; returns: ANDY | A100 ANDY | B391 ANDY | X010 TOM | A100 TOM | A510 ... and here's what you get with group_concat: SELECT empName, group_concat(projID SEPARATOR ' / ') FROM project_members GROUP BY empName; returns: ANDY | A100 / B391 / X010 TOM | A100 / A510 So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat? I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :) |
I wrote: the associated organizations must act urgently in introducing a new word for a foreign word before it has been widespread / becomes widespread / has become widespread / would been widespread / had been widespread / would have been widespread / would become widespread I guess I'm speaking an imaginary situation "before an imaginary word is widespread" (after the act have completely happened) or maybe it's just a fact. Do I need "would"? Anyway, which tenses I mentioned are correct or more idiomatic? | I am not sure if we can use the present for future events. I know we can use the historical present for past event, but I am not sure if we can use the present for future events. Here's an example sentence where the present is used for future events: You should ask God "What is the meaning of life" when he judges your soul. Is judges being in the present tense ok in this case? |
I met several times the term "socket", so I looked it up on different sites, but each of them required too much knowledge in order to understand the explanation. What I read were things like: sockets fall into the same category as pipes and name pipes sockets offer some kind of two-way communication sockets are used in inter-process communication sockets are sometimes mentioned with regard to networks I do not really get the big picture, what is the very purpose of a socket. Could you explain it maybe in terms that would not require too much technical knowledge (like C language)? | Could someone explain to me what a socket is? I see it in many acronyms in context of SSL, etc. Also, why is it called a socket? Is it purely because it was what a name they invented? Or was it the first name they came up with? |
I got this error with the listings package (v 1.5c). Should I install the language manually? ! Package Listings Error: Couldn't load requested language. See the Listings package documentation for explanation. Type H <return> for immediate help. ... l.161 ...{lstlisting}[language=json,firstnumber=1] This is my TeX version running on Mac OSX 10.9.5. TeX 3.14159265 (TeX Live 2014) kpathsea version 6.2.0 | I was wondering if there is a good way for JSON files to be listed with the listings package. The only language definition I could come up with, is this: \lstdefinelanguage{json} { morestring=[b]", morestring=[d]' } Now, this highlights the strings used in JSON files, but the important syntactical things in JSON are the curly braces, the square brackets, commas, and colons. I have sadly no Idea how I could make them be highlighted in a different manner. I tried adding { and } as identifier or as keywords, but it didn't work. I'd really like to make listed JSON files appear nicer, since on a project I need to document I'd really need it. Also, I couldn't find a JSON definition for that on the internet, anywhere else. On a more general thought: can I highlight all numerals with listings? |
I have a Canon 60D, bought it back in 2013. Use it quite a while, but in past two-three years, I lost interest in photography. I will be going on a long trip this summer and would like to take a decent camera with me. Is Canon 60D still a decent one or I will be missing on features and upgrades comparing to the latest versions? In terms of lenses I own Tamron 24-70 2.8 And Canon 100 2.8 Macro. | As the question says, when should I upgrade my camera body? In particular, if I have a low- to mid-range body (A DSLR such as a Nikon D3200 or Nikon D5100, or Canon SL1 or T5, or a mirrorless camera such as a Panasonic GH3 or an Olympus E-PL6). How do I know when I need to upgrade? I have a complement of "kit" lenses, such as an 18-55mm f3.5-5.6 and a 55-200mm f4-5.6. Maybe I've even added a 50mm 1.8 to the kit. Flash is only for indoors (right?) and I usually shoot outside, so that means I don't need an external flash. I shoot photos of my family and friends whether out at the park or having a picnic, my kids sports practices and games, vacation photos, as well as some landscapes, flowers, and whatever else catches my eye. Pretty familiar territory. I'm not a professional and don't intend to become one. |
Let the dihedral group $D_{12}=\{xy\mid x^6=y^2=1,xy=yx^{-1}=yx^5\}$ Order 2 subgroups are: $\{1, x^3\}$, $\{1, y\}$, $\{1, xy\}$, $\{1, x^2 y\}$,$\{1, x^3 y\}$, $\{1, x^4 y\}$,$\{1, x^5y\}$. Order 3 subgroups are: $\{1, x, x^5\}$, $\{1, x^2, x^4\}$. Order 6 subgroups are: $\{1, x, x^2, x^3, x^4, x^5\}$. Does $D_{12}$ have a subgroup of order 4? | It seems that $\{e\}, \{e,s\}, \{e,rs\}, \{e,r^2s\},...,\{e,r^{n-1}s\}, \{e,r,r^2,...,r^{n-1}\}, D_n$ are always subgroups of $D_n$. Especially when $n$ is odd, these seem to be the only subgroups. But when n is even, say $n=4$, then there are also $\{e,s,r^2,r^2s\}$ and $\{e,rs,r^2,r^3s\}$. It makes me wonder, is there a general formula/algorithm for finding all subgroups of $D_n$ when $n$ is even? |
I installed Ubuntu 14.04.2, a fresh install. Additional Drivers won't install the AMD flgrx proprietary drivers. I clicked on the radio button, pressed apply changes, and then the button just goes back to open source Xorg driver. It works on 14.10, but on that version it will not let me enter my encrypted password (works in 14.04). If I type password on 14.10 it does not populate the field. It just shows up at the top in plain text. Any ideas how to get flgrx in 14.04 or get encryption working in 14.10? | I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver? There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below: |
I have a registration form on a website. I'm using a pretty standard php form to send the form submission to me via email. I'm using a formhook to also insert those form entries into a mysql database. The only problem I have is when someone tries to include single or double quotes in a field. For instance one field asks for verbiage for the back of a t-shirt. Some people just seem to want to add quotes to their verbiage. This causes the information to not be inserted into the database. I'm somewhat new to sql and have been reading up on escaping quotes but still not grasping the solution. See my form below .. this is the formhook that inserts the information into the database. Is there a statement I can add to the php code that will allow both single and double quotes? Thank you! $con=mysql_connect($hostname,$username,$password); if(! $con) { die('Connection Failed'.mysql_error()); } mysql_select_db($database,$con); //if submit is not blanked i.e. it is clicked. { $sql="insert into sponsors2015(realname, sponsorname, email, phone, shirtnameverbiage, platinum_2500, gold_2000, silver_1500, bronze_1000, beverage_500, longdrive_200, closest_to_pin_200, par3_150, hole_100) values('".$_REQUEST['realname']."', '".$_REQUEST['sponsorname']."', '".$_REQUEST['email']."', '".$_REQUEST['phone']."', '".$_REQUEST['shirtnameverbiage']."', '".$_REQUEST['platinum_2500']."', '".$_REQUEST['gold_2000']."', '".$_REQUEST['silver_1500']."', '".$_REQUEST['bronze_1000']."', '".$_REQUEST['beverage_500']."', '".$_REQUEST['longdrive_200']."', '".$_REQUEST['closest_to_pin_200']."', '".$_REQUEST['par3_150']."', '".$_REQUEST['hole_100']."')"; $res=mysql_query($sql); if($res) { Echo header('Location: sponsor-registration-success.php'); } Else { Echo header('Location: sponsor-registration-problem.php'); } } | If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening? |
Web pages can be very long. When I save it as PDF, chrome splits it to multiple pages. Is there a way to create a single page PDF with custom page width/length? I need it to be a PDF in order to insert as attachment in wiki pages I’m maintaining. | I am trying to convert to a single-page, 19 x 13 pdf file. I am running Firefox under Ubuntu and trying to use the Print To File option, but it is splitting the web page into multiple pages. Is there a way to get the page into a single-page pdf with the given dimensions? Edit: I already tried setting the page dimensions to 19 x 13 using custom page size. The only noticeable effect is that each page now has more whitespace, but the page is still split across multiple pages. Also, I already saw the answer suggesting the plugin, which works, but I prefer a pdf because it is more scalable. |
I have this path of one of my images: \includegraphics[trim=0cm 0cm 0cm 0cm,clip,scale=.40]{Figures/Simulation_C_044 _023_4_21kV.pdf} When I compile the code, it shows me that there is an error in the line of the path. When I changed the name of the figure with other name, it works fine. Do you have any idea of solving this problem as I don't prefer to change the file names. | I want to import graphics into my main input file using the macro \includegraphics. It does not work if the filename contains spaces. also discusses this subject, but there is no solution there. My compilation routine is latex->dvips->ps2pdf (because of PSTricks). |
Why are "magnetic field lines" called "lines of force" when they are actually perpendicular to direction of force (Lorentz force,cross product)? It makes sense to call "field lines" as "lines of force" in case of fields like gravitational, electrostatic, etc., but not in magnetic force it seems to me. | What's the difference between magnetic field and electric field lines? Does $d\vec B$ point in the direction you would experience a force if you were a moving charged particle at that point? I know for a fact the electric field and electrostatic force are parallel, but since $F = q\ \vec v \times \vec B$ for magnetic forces. Does that actually mean though that if, say, in the following graphic: Where the dot is a wire going in and out of the page, that the $d\vec B$ vectors are not showing how a moving charged particle will move in the field? Basically, I feel justified in thinking electric field lines communicate how a test charge will move at any given point in space. How can I juxtapose this with magnetic field lines> |
The following packages have unmet dependencies: gstreamer1.0-libav: Depends: libavcodec-extra-54 (>= 6:9.13) but 6:9.18-0ubuntu0.14.04.1 is to be installed Depends: libavformat54 (>= 6:9.1-1) but 6:9.18-0ubuntu0.14.04.1 is to be installed Depends: libavutil52 (>= 6:9.1-1) but 6:9.18-0ubuntu0.14.04.1 is to be installed Depends: libc6 (>= 2.14) but 2.19-0ubuntu6.9 is to be installed Depends: libglib2.0-0 (>= 2.37.3) but 2.40.2-0ubuntu1 is to be installed | Occasionally, when I'm installing stuff, I get an error like the following: Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. How can I resolve this? |
I made a function using jQuery and Ajax to append info from a separate PHP file to another file. Lets call the destination file "Homepage" and the file containing the data "Template". So i use this function: var box = $('#infoPageContainer'), close = $('.arrow'); btn1.click( function(){ event.preventDefault(); if( box.hasClass( 'active' )){ box.removeClass( 'active' ); box.css( "width", "0%" ); $('#placeholder1').fadeOut(600); setTimeout(function(){ $('#placeholder1').html(""); },1000); } else { box.addClass('active'); box.css( "width", "100%" ); $.ajax({ url: 'template/parts/Template.php', success: function(data){ $('#placeholder1').html(data).fadeIn(600); }, beforeSend: function(){ $('#placeholder1').html("loading").fadeIn(600); } }); } }); To append this data: <div class="mainImgContainer1 templateImgContainer"></div> <div class="textContainer"> <img src="img/arrow-01.png" alt="arrow" class="arrow"> <div class="titleContainer"><h3>Veldopstellingen</h3></div> <div class="textWrapper"> <h4>Dit is de titel</h4> <p class="broodTekst">Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</p> </div> </div> As you can see I use a switch that checks for an 'Active' class and runs the respective function. What I want however, is the function removing the appended data to be triggered by a button that is appended (Img with Arrow class). So like this: close.click( function(){ event.preventDefault(); box.removeClass( 'active' ); box.css( "width", "0%" ); $('#placeholder1').fadeOut(600); setTimeout(function(){ $('#placeholder1').html(""); },1000); }); But when I do so, nothing happens even tho the function does work when I don't use an appended object as trigger. What should I do? | 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 am running python 3.0 and need to make a permutation from a list of 7 numbers in that list, but I am not finding any decent sample code or guide to create all the permutations. Could someone please put some sample code as to how I would make and be able to print all the permutations. | How do you generate all the permutations of a list in Python, independently of the type of elements in that list? For example: permutations([]) [] permutations([1]) [1] permutations([1, 2]) [1, 2] [2, 1] permutations([1, 2, 3]) [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1] |
Cantor's construction of $\aleph_1$ is to notice that all ordinals constructed after $\omega$ are countable, take the union of all countable ordinals, and then show that this union can not be countable. However, in ZFC the union can only be taken over a set. I can see how to relate countable ordinals to elements of $2^{\aleph_0}$ proving that their collection is a set by specification, but that requires the power set axiom. The "slicker" modern way, declaring $\aleph_1$ to be the least uncountable cardinal, already presupposes the existence of uncountable cardinals. That's even worse since in addition to power set one needs choice to prove that $2^{\aleph_0}$ is an aleph, and then it is greater by the diagonal argument. It wouldn't surprise me that some voodoo with collection or replacemnt schemas does the trick, but then my question is what does it translate to in "naive" terms of Cantor? What reason do we have for the collection of countable ordinals to be a set (without invoking formulas in the first order logic and definable functions)? If power set isn't required why can't Cantor's argument be reproduced to create inaccessible cardinals by noticing that all cardinals produced after $\aleph_0$ are, by construction, accessible? | Assume $M$ is a set, in which all axioms of $ZF - P + (V=L)$ hold. Does then $M$ believe that there exists an uncountable ordinal? I mean, why should the class of all countable ordinal numbers be a set? |
The (right-) censoring of likelihood function is defined as: $$ L(\theta) = \prod_{i=1}^m f(x_i;\theta) \cdot \prod_{i=m+1}^n P_{\theta}(X_j>a) $$ where observations $x_i$, $i=1,...,m$ have known values and for $m+1,...,n$ the values are unknown. I would like to know, how has this been derived? I.e. why is this the definition for censoring? | My dependent variable shown below doesn't fit any stock distribution that I know of. Linear regression produces somewhat non-normal, right-skewed residuals that relate to predicted Y in an odd way (2nd plot). Any suggestions for transformations or other ways to obtain most valid results and best predictive accuracy? If possible I'd like to avoid clumsy categorizing into, say, 5 values (e.g., 0, lo%, med%, hi%, 1). |
Subsets and Splits