body1
stringlengths 20
4.1k
| body2
stringlengths 23
4.09k
|
---|---|
I have many python files all with the same variable names but different values. Something like this would be in one: var_one = 'happy' var_two = '2345' var_three = '-24.24' var_four = 'Chocolate' I need to write a Python script that can read these files and when I ask for var_one it returns happy. If I ask for var_two it returns 2345 and so on and so forth. Right now I have a python two compliant toolbox that does this using something along the lines of: for fname in myfile: d = toolbox.datafile(fname) my_mood = d['var_one'] number = d['var_two'] decimal = d['var_three'] candy = d['var_four'] And then printing my_mood would print out happy. However, this toolbox is not python 3 compliant and I did not make it so I would like to know if there is an easy built in toolbox that can accomplish this task. Thanks in advance EDIT** The importing method seems like it will be the most helpful for answering this question. The only problem that I have now with it is that I do not know how to import the files. To explain further I am going to be parsing the command-line arguments and one of the arguments will be the location of said file that we want to import. What is the syntax to import that? I have an args.file that equals <home/myname/python/myfile.py> So how would I import args.file? | How can I load a Python module given its full path? Note that the file can be anywhere in the filesystem, as it is a configuration option. |
There are manga/anime called "something;something", what for? does it server any purpose for identifying it as a series? example: steins;gate, robotic;notes. | The following anime share the use of the semicolon as part of their names: Steins;Gate Chaos;Head Robotics;Notes Occultic;Nine What is the reason for using the semicolon within the titles of these anime? |
I'm trying to wrap my head around interfaces and I've been reading a lot of similar questions/answers on the topic, but it's still not clicking with me. I understand what an interface literally is, but I don't get why you would ever use it. So an interface contains a bunch of empty functions, and you then implement that interface in a class. But what I don't get is, you still have to write a full function declaration for any function you take from the interface. So say you have a function 'void printHello()' in your interface, and you implement that interface in a class. You still have to write: public void printHello() { System.out.println("Hello!"); } which is a complete function declaration. You could delete the 'implements interface' command and literally nothing would change, you would still have a working function 'printHello()'. So functionally speaking, isn't the interface basically doing nothing? To go further, you could have another class that also implements the same interface, but you could make the same function do something completely different: public void printHello() { System.out.println("Bababooey!"); } So it's not like it's pre-defining functions so you can call them anywhere like a class/object would do. If this is the case what is the interface really providing? | I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this? I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly. Is it just so if you were to do: IInterface classRef = new ObjectWhatever() You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that. Also, how could you write a method that takes in an object that implements an interface? Is that possible? |
What would be the correct sentence and why: He is president of Finland? or He is the president of Finland? | I saw this in on Stuff. Who is Greek president? Jose Barroso Karolos Papoulias Lucas Papademos Panagiotis Pikrammenos (sic) Surely the word "the" should be in there somewhere? But I've heard, for example, "US President Barack Obama" used instead of "the US President Barack Obama", so I'm curious if this construct is actually valid. |
Hello i want create photo like this image I want this logo to be in the upper right corner and in the person's photo this is my code <div style='position:relative'> <img src='https://i.ibb.co/gFsCTmf/orang.jpg'> <img src='https://i.ibb.co/hLB6zMr/logo.png' style='position:absoulute;top:-10px;right:0px'> </div> and this is my im try add position absolute in logo image and div position relative doesn't work. Help me thank's | I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup showing a larger version of the image. On top of this linked image I would like an image of a magnifying glass, to show people that the image can be clicked to enlarge it (apparently this isn't obvious without the magnifying glass). |
(All of the following is done in R, code to reproduce the dataset is given at the end of this post.) I have a simulated data set, generated in the following way: Make 10 categories and label them 1-10. Assign a probability value to each of the categories, so that the first two have probability 0, and the rest have probability drawn uniformly from the interval $[0, 1]$. For each category, draw 50 samples from the Bernoulli distribution with success probability equal to the category's assigned probability. Thus, the dataset has 500 observations, a sample is shown below: > dt names probs response 1: 1 0.0000000 0 2: 1 0.0000000 0 3: 1 0.0000000 0 4: 1 0.0000000 0 5: 1 0.0000000 0 --- 496: 10 0.9446753 0 497: 10 0.9446753 1 498: 10 0.9446753 1 499: 10 0.9446753 1 500: 10 0.9446753 1 Now, I fit a logistic regression with formula response ~ name. My understanding of this is that the predicted value assigned to each category is just the mean of the response for that category. This holds true. However, the regression coefficients are all insignificant: Call: glm(formula = response ~ names, family = "binomial", data = dt) Deviance Residuals: Min 1Q Median 3Q Max -2.53727 -0.45904 -0.00013 0.54922 2.14597 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -1.857e+01 9.224e+02 -0.020 0.984 names2 8.728e-11 1.305e+03 0.000 1.000 names3 2.174e+01 9.224e+02 0.024 0.981 names4 1.762e+01 9.224e+02 0.019 0.985 names5 1.762e+01 9.224e+02 0.019 0.985 names6 1.881e+01 9.224e+02 0.020 0.984 names7 2.022e+01 9.224e+02 0.022 0.983 names8 1.637e+01 9.224e+02 0.018 0.986 names9 2.038e+01 9.224e+02 0.022 0.982 names10 2.132e+01 9.224e+02 0.023 0.982 (Dispersion parameter for binomial family taken to be 1) Null deviance: 692.50 on 499 degrees of freedom Residual deviance: 343.65 on 490 degrees of freedom AIC: 363.65 Why does this happen and what does it mean? I have seen other questions dealing with some insignificant categories, where the advice then is that the significance of addition of the categorical variable should be tested using likelihood ratio or a chi-square test. In this case the chi-square test shows that adding names to the null model improves the fit. Code to generate data and models in R: library(dplyr) library(data.table) df <- data.frame(names = factor(1:10)) set.seed(0) df$probs <- c(0, 0, runif(8, 0, 1)) df$response = lapply(df$probs, function(i){ rbinom(50, 1, i) }) dt <- data.table(df) dt <- dt[, list(response = unlist(response)), by = c('names', 'probs')] lm0 <- glm(data = dt, formula = response ~ 1, family = 'binomial') summary(lm0) lm1 <- glm(data = dt, formula = response ~ names, family = 'binomial') summary(lm1) anova(lm0, lm1, test = 'Chisq') | I'm using R to run some logistic regression. My variables were continuous, but I used cut to bucket the data. Some particular buckets for these variables always result in dependent variable being equal to 1. As expcted, the coefficient estimate for this bucket is very high, but the p-value is also high. There are about ~90 observations in either these buckets, and around 800 total observations, so I don't think it's a problem of sample size. Also, this variable should not be related to other variables, which would naturally reduce their p-values. Are there any other plausible explanations for the high p-value? Example: myData <- read.csv("application.csv", header = TRUE) myData$FICO <- cut(myData$FICO, c(0, 660, 680, 700, 720, 740, 780, Inf), right = FALSE) myData$CLTV <- cut(myData$CLTV, c(0, 70, 80, 90, 95, 100, 125, Inf), right = FALSE) fit <- glm(Denied ~ CLTV + FICO, data = myData, family=binomial()) Results are something like this: Deviance Residuals: Min 1Q Median 3Q Max -1.53831 -0.77944 -0.62487 0.00027 2.09771 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -1.33630 0.23250 -5.747 9.06e-09 *** CLTV(70,80] -0.54961 0.34864 -1.576 0.114930 CLTV(80,90] -0.51413 0.31230 -1.646 0.099715 . CLTV(90,95] -0.74648 0.37221 -2.006 0.044904 * CLTV(95,100] 0.38370 0.37709 1.018 0.308906 CLTV(100,125] -0.01554 0.25187 -0.062 0.950792 CLTV(125,Inf] 18.49557 443.55550 0.042 0.966739 FICO[0,660) 19.64884 3956.18034 0.005 0.996037 FICO[660,680) 1.77008 0.47653 3.715 0.000204 *** FICO[680,700) 0.98575 0.30859 3.194 0.001402 ** FICO[700,720) 1.31767 0.27166 4.850 1.23e-06 *** FICO[720,740) 0.62720 0.29819 2.103 0.035434 * FICO[740,780) 0.31605 0.23369 1.352 0.176236 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1037.43 on 810 degrees of freedom Residual deviance: 803.88 on 798 degrees of freedom AIC: 829.88 Number of Fisher Scoring iterations: 16 FICO in the range [0, 660) and CLTV in the range (125, Inf] indeed always results in Denial = 1, so their coefficients are very large, but why are they also "insignificant"? |
I have a function that may return a value or may return null and I want to assign it to a variable. So at the moment I've got someVar = (someFun()) ? someFun() : "foo"; Is there a shorterer way of doing it, where I don't have to call the function twice, or add an extra variable like: funResult = someFun(); someVar = (funResult) ? funResult : "foo"; Basically, something like: someVar = someFun() | "foo" | Is there a null coalescing operator in Javascript? For example, in C#, I can do this: String someString = null; var whatIWant = someString ?? "Cookies!"; The best approximation I can figure out for Javascript is using the conditional operator: var someString = null; var whatIWant = someString ? someString : 'Cookies!'; Which is sorta icky IMHO. Can I do better? |
How can we create a empty file with the unix name -stuff. It means the name start with -. I tried with touch -stuff but it didn't work. | How do you remove a file whose filename begins with a dash (hyphen or minus) -? I'm ssh'd into a remote OSX server and I have this file in my directory: tohru:~ $ ls -l total 8 -rw-r--r-- 1 me staff 1352 Aug 18 14:33 --help ... How in the world can I delete --help from a CLI? This issue is something that I come across in different forms on occasion, these files are easy to create, but hard to get rid of. I have tried using backslash rm \-\-help I have tried quotes rm "--help" How do I prevent the minus (dash or hyphen) character to be interpreted as an option? |
When I enter point id 1790 result join is only one input. I won from list all id_gm to be shown in atribute table of layer tacka6. Can this be done in Qgis? Solution | I'm trying to create a join/relate in QGIS where I have a shapefile of buildings and to that I would like to join a non-spatial table (.csv-file) containing people who work in each building. So I have multiple records in my table that I would like to be able to join to my single features in my shapefile. I can only run a join in QGIS where the first record is joined to the shapefile feature (ie building) but subsequent records get removed. Could someone let me know how to complete this join/relate in QGIS? |
I'm looking for something to the equivalent of . It's an animated gif screen capture tool. I use it mainly for capturing QA bug reports during development. | I've seen animated GIF images of screen casts (like the one below) promoted a few times on this site as a way to improve answers. What toolchain is being used to create these? Is there a program that does this automagically, or are people taking screencasts, converting them into a series of static frames, and then creating the GIF images? |
I am using 50 mm 1.8 potrait lens with my canon 600D. But when i take a portrait with f1.8 on Av mode using autofocus, only subjects eyes are sharp and rest of the other face is slightly blurry. How to overcome this? | What f/# do you use to photograph people, and why? I know this varies from shot to shot. Let's suppose that you are photographing either a single person or a couple, that it it outside on a somewhat overcast day. What depth of field do you prefer to use, and why? What about indoors in a more-controlled setting — what is typically used in studio photography? What about in other conditions? |
I use Delphi 10.4 and build 32 and 64 Bit applications. I noticed that the initialization of boolean variables depends on the type of application (32 bit and 64 bit). I build a simple app. Here is my code: procedure TForm1.Button1Click(Sender: TObject); var value: boolean; begin ShowMessage(value.ToString); end; In 32 bit value is true and in 64 bit value is false. Is this a normal behaviour? And how can I change it? | I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default: TInstanceVariables = class fBoolean: boolean; // always starts off as false fInteger: integer; // always starts off as zero fObject: TObject; // always starts off as nil end; This is the behaviour I'm used to from other languages, but I'm wondering if it's safe to rely on it in Delphi? For example, I'm wondering if it might depend on a compiler setting, or perhaps work differently on different machines. Is it normal to rely on default initialized values for objects, or do you explicitly set all instance variables in the constructor? As for stack (procedure-level) variables, my tests are showing that unitialized booleans are true, unitialized integers are 2129993264, and uninialized objects are just invalid pointers (i.e. not nil). I'm guessing the norm is to always set procedure-level variables before accessing them? |
Upon trying to install "Software modem" or the "SmartLink modem daemon", a proprietary driver, I get the error SystemError: E:Unable to correct problems, you have held broken packages." Is their anyway to fix this? | 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. |
Figure 1 shows an equilateral triangle with side length equal to $1$. Two squares of side length $a$ and $2a$ placed side by side just fit inside the triangle as shown. | Question: Figure shows an equilateral triangle with side length equal to $1$ . Two squares of side length a and $2a$ placed side by side just fit inside the triangle as shown. Find the exact value of $a$. Its an Assessment question from edX course "A-Level Mathematics Course 1" and I am supposed to use skills that I learnt in Indices and surds,Inequalities and The Factor Theorem. I have tried finding the height of triangle and then use similar triangles to find the right triangle length still No luck. I am just looking for food for thought or very small hints thats all. |
I need a description of what hairstyle is that contains those same bangs | Its a kind of hairstyle that has two hair strands hanging down from the top of the head maybe at the center of it |
I am new user with LaTeX. Can anyone share related material in implementing following figure in LaTeX? | I would like to use a small image in an equation, where a symbol like \alpha might otherwise be. Is there a nice way to do this? |
i've a custom object Score has to be rollup to grand parent Account. Score-project-account is the lookup currently. How to get count of a field of score onto account? | I have three different objects A (Grand Parent), B (Child) & C (Grand Child). All the three objects are related by a lookup relationship. Now, there is field on A object, IsActive which is a checkbox and another field IsEligible on object C which is also a checkbox. Now, if any of the Grandchild associated with A is having IsEligible marked as TRUE, then IsActive on the A's record should be marked as TRUE . If none of the Grandchild records are having IsEligible marked as TRUE, then IsActive should be marked as FALSE. Parent - A Child - B1, B2 GrandChild - C1, C2 associated with B1 & C3, C4 associated with B2. If either of the records, C1, C2, C3, C4, has IsEligible = TRUE, then IsActive = TRUE on A. If neither of the records, C1, C2, C3, C4, has IsEligible = TRUE, then IsActive = FALSE on A. How can this functionality be achieved? |
I am a beginner for the regular expressions pattern matching in python. please help me to solve this problem. I want to extract some texts from the given string. Please check the below example. String : "keyword//match1/match2/more_text_with_/_more_and_more_/_texts" I need to extract "match1" and "match2" I wrote the following python code to do that... import re astr = 'keyword//match1/match2/more_text_with_/_more_and_more_/_texts' match = re.search('keyword//(.*)/(.*)/.*', astr) print("match1 : ", match.group(1)) print("match2 : ", match.group(2)) The result is... match1 : match1/match2/more_text_with_ match2 : _more_and_more_ I read about "How Regex Engine Works" from here And I can understand why this result comes. But I have no idea to write a regular expression to get my required matching texts. Please help me with this. Thank you very much, | I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}: The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}? |
I've been struggling with an independent clause question: I always run at night, and then I go see my nephew. Would a comma go before "and"? I wasn't sure if "then I go see my nephew" would be considered an independent clause. I know "then" is an adverb, but I'm not sure if I can start a sentence with it. | This was at a moment when the magistrate, overcome with tiredness, had gone down into the garden of his house and, dark, bent beneath some implacable thought, like Tarquin cutting the heads off the tallest poppies with his cane, M. de Villefort was knocking down the long, dying stems of the hollyhocks that rose on either side of the path like ghosts of those flowers that had been so brilliant in the seasons that had passed away. Why is there no comma before the bolded and? My understanding is that there is an independent clause on each side of the bolded and. By the way, the subject of the two independent clauses is the same. |
I am doing research for three different questions and I am going to present one single thesis statement for each question. Would I refer to all three statements as 'thesis statements' or as 'theses statements'? Intuitively, I would choose the latter as both the total number of statements and questions are plural. Which one is correct though? | When should a noun that’s used attributively to describe another noun be plural, and when should it be singular? And when should it be possessive, like baker’s dozen and when should it be plural possessive, like farmers’ market? In other words, why do we say teachers union rather than teacher union? And why do we say wedding planner rather than weddings planner? Which of these variants is or are correct? student union students union student’s union students’ union What about community values versus community’s values? Please note I am looking for a general rule or at least some tips. These are only examples. Update: It seems even native speakers follow their personal style to write such compound words. I wonder why in the IELTS listening section, the language learner has to write a specific form and there is no rule for this. |
I am trying to search for few strings from the logline and exclude those lines. If I try with string directly it works but if I read the strings from a config file, it doesn't. The problem is due to the type. Can someone put some light into this in converting the list to string? Code match1 = config.get('sky_messages', 'matches') match = list(match1.split(",")) print(match1) print(match) print(type(match1)) print(type(match)) Config File [sky_messages] matches = ['Conviva', 'conviva', 'EDID', 'CONVIVA'] Output ['Conviva', 'conviva', 'EDID', 'CONVIVA'] ["['Conviva'", " 'conviva'", " 'EDID'", " 'CONVIVA']"] <class 'str'> <class 'list'> How can I get the string as match1? | The typical ConfigParser generated file looks like: [Section] bar=foo [Section 2] bar2= baz Now, is there a way to index lists like, for instance: [Section 3] barList={ item1, item2 } Related question: |
I write here to ask for a suggestion about a graduate level Bayesian statistics book. I have a bachelor degree in statistics but despite having a fairly solid background on frequentist and non parametric statistics, I do not know much about Bayesian statistics. In particular I am undecided between these two books: Doing Bayesian Data Analysis Statistical Rethinking Which one is right for me? I know R very well, so the presence of examples on R is an added value. | Which is the best introductory textbook for Bayesian statistics? One book per answer, please. |
What is the term for when someone is lazy and it backfires and they end up doing more work than they would have if they just hadn't been lazy in the first place? | What is the idiom, proverb for "Little problems often become big problems if no one takes the initiative to correct them" Which means in an example that If the employees don’t bother to report a malfunctioning machine or a slip-and-fall hazard, serious injuries could occur – injuries that could have been preventable. Ignoring any hazard can be detrimental to one's business and the safety of their employees. |
I've following table: PERSON_ID EFFECTIVE_END_DATE ASSIGNMENT_ID FULL_NAME 33151 2013-08-04 00:00:00.0 33885 Test, C 33151 2013-10-04 00:00:00.0 33885 Test, C 33151 2015-02-19 00:00:00.0 33885 Test, C 33151 2013-08-04 00:00:00.0 33885 Test, C 33151 2013-10-04 00:00:00.0 33885 Test, C 33151 2015-02-19 00:00:00.0 33885 Test, C Here PERSON_ID is same I want to select row with maximum effective end date without using group by. Can some one help me ? | Table: UserId, Value, Date. I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle) Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date. |
My HTML code is like below Some of my CSS code is like below .content { min-height: 58vh; } footer { position: fixed; bottom: 0px; width: 100%; } body { font-family: 'Roboto', sans-serif; color: #a0a6ad; font-size: 14px; font-weight: 400; background: #fff; overflow-x: hidden; } html { overflow-x: hidden; } .footer-Content { padding-top: 36px; } I would like to make the footer responsive. So that when I decrease screen size it will stay at the bottom of the page. If content is larger that page and I use below code then footer is fixed not scrolling with the page. footer { position:fixed; bottom:0; } Actually I need a footer which will stay at the bottom of the page if screen size is increase or decrease and it will scroll with the page if the content is larger than the screen size. | I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's not always the case. |
How can I do daily backups for my VisualSVN Repos? Its on a Windows Server 2003 machine with VisualSVN Server, I was thinking about just doing an xcopy of the folder C:\Repo but I'm not familiar enough with svn to know if that will cause issues. Should I use dump or hotcopy or both? | At this moment we are using Visual SVN and we are backing up the entire repositories directory for visual svn. This backs up the entire data for each repository inside our svn engine. I am curious if I will be able to restore those files in case of an emergency or a disaster? Any of you have experience with this restoration procedure? Thanks. |
Electrons flow from low potential to high potential in DC, i.e. from negative terminal to positive terminal. But how do they flow in AC, as the polarity changes every 10ms for 50Hz? | when we use a DC battery into a circuit the flow of electrons in wire creates a clear picture as they flow from negative terminal to positive terminal. under AC(Alternating current) we know how energy flows and what does it mean by $I_{rms}$ or average current etc. But what about the pattern in which electrons move? |
Logically, if the only proof of existence we have is what we can see, hear, smell, touch, taste, and feel the movement of, why do many philosophies deal with issues outside the physical? Due to these scientific limitations of not being able to prove anything nonphysical (not limited to entities/ concepts surrounding spirituality and religion[s]) exists in any concrete way that affects our daily lives in ways that WE OURSELVES don't choose it to, why doesn't philosophy eliminate these concepts? | Nonphysical entities cannot be observed. Therefore such entities cannot be verified by observation. How could statements like "God exists" be even considered true? Why would anyone appeal to the metaphysical realm at all? It seems to me that the best method by which we should go about in understanding the world is by initially ruling out the possibility of the metaphysical altogether for the simplest answer (a sort of null hypothesis). Once we can get a hold of a natural cause of some phenomenon, we should be satisfied that that is all there is to it. Formulating some nonphysical cause would be unnecessary, superfluously complicated, or even cluttered. Now if there was some problem that we were certain could not be solved by observation or experimentation or whose solution could not possibly exist in the observable realm, yet must be true, I would consider the possibility of a metaphysical cause. That said, I don't think that if you can't empirically observe something, it doesn't exist; rather, I would declare total agnosticism and say that it is unknowable. |
Say I have set up a few aliases for long bash commands: alias test1='long-command-1' alias test2='long-command-2' and so on. Is it possible to list all aliases currently defined (ideally with the command it is an alias for)? Is it possible to undefine (remove) an alias? | I want to remove gs alias from my PC. When I type gs it will open GhostScript. But I checked everywhere in the home directory .alias .bash_aliases .bashrc I also overwrite the gs with my custom alias. I can't remove it. And I also type alias in terminal, in the list I couldn't find it. Please I want to remove it... |
I am running 18.04 (new laptop for work) and I do not see an option to tile, stretch or fit the background image for the desktop. How do I do this? When I go to the Background Pane of Settings, I don't see an option Nor do I see an option when I select a custom image to tile Searching for "tile" does not show anything either | Up until a couple months ago, if I changed my wallpaper/background image, I could choose between tile, zoom, centre, scale, fill or span. These options no longer appear in GUI for changing the background image. I am using Ubuntu 17.10. |
I'm facing the following problem: that is Get-ChildItem shows the directory but Remove-Item says that it does not exist !! I yet try chkdsk, file explorer, trying to rename it,... but I just can't remove that directory please help. Gci . -dir|%{Remove-Item -LiteralPath "$($_.FullName)"} gives: Remove-Item : Cannot find path 'D:\data\inpibug\ustocks ' because it does not exist. At line:1 char:14 + Gci . -dir|%{Remove-Item -LiteralPath "$($_.FullName)"} + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (D:\data\inpibug\ustocks :String) [Remove-Item], ItemNotFoundException + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.RemoveItemCommand | I have created a folder via , but I made a mistake since I forgot to clear spaces. Now I cannot delete this folder. I have found a similar issue here - (Quoted below), but I don't know how to rename a folder with . I had the same problem, in Windows 7 x64, and none of the command-line solutions worked here. What fixed it for me: Rename the folder using 7-Zip Delete, either using 7-Zip or (both work). Note that deleting the folder in 7-Zip before renaming it was impossible. I also tried the command line, but it does not work. My folder is named " 1 ". I downloaded 7-Zip, and Google does not provide the help I need. |
Suppose that $C$ is the cantor set and let $\sim$ be an equivalence relation on $C$. Are there necessary and sufficient conditions on $\sim$ to guarantee that the quotient $C/\sim$ is Hausdorff? What I know: If $q: X \to Y$ is an arbitrary quotient map then $Y$ is $T_1$ if and only if the fibres of $q$ are closed. So the equivalence classes of $\sim$ must be closed in $C$. Since $C$ is compact and normal, the results listed in imply that if the quotient map $q: C \to C/\sim$ is closed then $C/\sim$ will be Hausdorff. What conditions can be put on $\sim$ to guarantee that the quotient map is closed? | $X$ is a Hausdorff space and $\sim$ is an equivalence relation. If the quotient map is open, then $X/{\sim}$ is a Hausdorff space if and only if $\sim$ is a closed subset of the product space $X \times X$. Necessity is obvious, but I don't know how to prove the other side. That is, $\sim$ is a closed subset of the product space $X \times X$ $\Rightarrow$ $X/{\sim}$ is a Hausdorff space. Any advices and comments will be appreciated. |
I am trying to do something simple yet i haven't found a way to do it in blender that is animating the drawing of borders of a shape (rectangles, triangles...) you can see an example on youtube of the result i am trying to achieve : If anyone has a good technique to do it or a blender file it would be cool. Thanks. | I have an SVG logo, which I will import into Blender. I'm trying to think how to have the colour (not outline) fill up from left to right. I think the following steps put me on the right track, but struggling how to full resolve this: Import SVG to Blender Convert Curve to Mesh for the imported object Extrude object (to make it 3D) That's as far as I know how to do, then I think the following steps are needed (which I don't know how to do). Create an outline of the 3D object (with no fill) Draw a path across the object with timeline Animate the path being filled Would be grateful for any ideas how to achieve this. :) |
I created two shapes in the same layer by mistake and I want to delete one of them only. I couldn't go back with ctrl z because I already did several other stuff afterwards. Is it possible to remove one shape from a layer that contains another shape which I want to keep? I am using Adobe Photoshop. | I have created an arrow shape (rightmost in image), from which I wish to cut out the majority so that only two thin sides remain. The most accurate way to do this would be to duplicate the shape and to somehow use the duplicate (leftmost in image) to remove the chunk that I no longer desire from the original. I am not sure what to do after the duplication, however, or if this method is even possible? Is there a better one? |
Here is an image of the device I have: However, the chip used in my dongle is BCM2035. It is a standard USB Bluetooth Dongle. I have never used a Bluetooth with an MCU before. I'm guessing the use of Vcc, Gnd, Rx and Tx pins. This dongle offers me USB interface as you can see, which is connected to 6 pins on the board. I am not sure what all these pins are and how should I interface. | Is it possible to use a mini USB Bluetooth dongle like in the following picture in order to improve my , so it can comunicate with other Bluetooth devices? If it is, how can I do that? |
Show that if a non-empty bounded set A $\subset$ R and s = sup A then there is a sequence such that A converges to s. I guess that I should use the epsilon definition of supreme for this question but I am not exactly sure how. | Let $S$ be a bounded set. Prove there is an increasing sequence ($s_n$) of points in $S$ such that $\lim s_n = \sup S$. Note: If $\sup S$ is in $S$, it’s sufficient to define $s_n = \sup S$ for all $n$. What I have tried so far: Let $M=\sup S, L = \lim\, s_n,\,|s_n-L|<\epsilon/2$, then $M-\epsilon < L- \epsilon/2 < s_n < M < M+\epsilon$. But I get this based on $M <= \epsilon+L$, because $\epsilon+L$ is an upper bound for $s_n$. However, as $s_n$ are just points in $S$, so I don't know if it's sufficient to say $M$, which is the $\sup$ of $S$, is smaller than $L+\epsilon$. |
As far as I know, the previous version of data dump of stackoverflow is on clearbits.net. However, recently, I cannot find them. I even cannot access clearbits website. Right now, I can only find the one on Jan-20-2014 and 09-2013. But where are the others? I once saw a lot on clearbits. | I tried to connect to and got an error message: ERR_ADDRESS_UNREACHABLE. Is this a known problem? Do you expect that the problem will be solved soon? |
I wanted to create a zone named "bad" with a target=reject and source=10.100.0.0/24 which will basically reject all traffic from that subnet. In the zone. Now, if I want to allow traffic to SSH from that subnet, how can I do that? I tried adding service SSH to "bad" zone but no luck, then I tried to add a rich rule no luck... I tried to do what a firewall would normally do, which is denying all request that didn't match any rule... Thanks | I would like to open port 4567 for the IP address 1.2.3.4 with the firewall-cmd command on a CentOS 7.1 server. How can I achieve this, as the documentation I could find was too specific on this? |
EDIT: This question is as suspected a duplicate, so please check out the former post. Sonic's answer explains in detail how people end asking questions on Meta. Journeyman Geek . A better quantitative answer from Shog9 how people end here . There are sometimes questions inside Meta where obvious new and inexperienced users are asking questions belonging to a site. How do those users come to Meta? My experience is that you don't enter Meta accidentally. Do we have an non-obvious UI problem? If we track how they enter the site, is there an obvious route which can cause that an inexperienced user ends here? Or do we have so many questions that those users are simply unpreventable outliers who do not care where they land and dump their question into Meta? :/ | For quite some time, newer users seem to ask a lot of blatantly off-topic questions here on Meta. They are mostly programming questions that should have been closed asked on Stack Overflow, along with some other questions that would fit into Super User or Server Fault, as well as a few others that have totally nothing to do with the Stack Exchange network. I'm curious as this issue seems to be specific to Meta Stack Exchange (and MSO to some extent), and the frequency varies every day. What could be the cause? |
We state that electrons are subatomic particles with no known subcomponents. We discover that these electrons behave as waves. We also discover that sometimes, these electrons behave as point-particles. We conclude that they're the both at the same time. This, to me, sounds nonsensical. If this happened in math, and one discovered that 1 = 2, one would not go around saying that we have one-two duality, would we? No, we would question the axioms that we used to perform our calculations. If one-two duality is an outcome of those axioms, we should not accept one-two duality, rather we should reject the axioms! Yet, in physics, this does not seem to be the case. Why? Why is wave-particle duality accepted, rather than the axioms rejected? And what are the axioms in this case? Well, it's the first line in this question. We assumed electrons have no known subcomponents. Well, clearly our experimens show we're wrong. They do have subcomponents, and when the wave-like behavior of electrons occurs, it occurs precisely because of interactions between those subcomponents that we are not familiar with and therefore cannot understand. So what am I missing? It seems like physicists have accepted this bizarre notion of wave-particle duality that even Einstein thought was an embarrassment of physics, rather than consider that some premises may be wrong and it is those wrong premises that lead to the wave-particle duality. | I often hear about the wave-particle duality, and how particles exhibit properties of both particles and waves. However, I wonder, is this actually a duality? At the most fundamental level, we 'know' that everything is made up out of particles, whether those are photons, electrons, or maybe even strings. That light for example, also shows wave-like properties, why does that even matter? Don't we know that everything is made up of particles? In other words, wasn't Young wrong and Newton right, instead of them both being right? |
I'm new to Ubuntu, and despite all what I could read, I cannot find, or I'm just unable, to fix my problem. In the upper right corner of the screen I have a "stop" sign, that says: An error occured. Please run Package Manager from the right-click menu or run apt-get in a > terminal to see what is wrong. The error message was: 'Unknown error: '<class 'SystemError'> > (E:Malformed line 57 in source list/etc/apt/sources.list(dist parse))'. This usually means > that your installed packages have unmet dependencies" When I run "Apt-get", here is what I have: girouxn@girouxn-ThinkPad-X220:~$ apt-get apt 1.0.1ubuntu2 for amd64 compiled on Oct 28 2014 20:55:14 Usage: apt-get [options] command apt-get [options] install|remove pkg1 [pkg2 ...] apt-get [options] source pkg1 [pkg2 ...] apt-get is a simple command line interface for downloading and installing packages. The most frequently used commands are update and install. Commands: update - Retrieve new lists of packages upgrade - Perform an upgrade install - Install new packages (pkg is libc6 not libc6.deb) remove - Remove packages autoremove - Remove automatically all unused packages purge - Remove packages and config files source - Download source archives build-dep - Configure build-dependencies for source packages dist-upgrade - Distribution upgrade, see apt-get(8) dselect-upgrade - Follow dselect selections clean - Erase downloaded archive files autoclean - Erase old downloaded archive files check - Verify that there are no broken dependencies changelog - Download and display the changelog for the given package download - Download the binary package into the current directory Options: -h This help text. -q Loggable output - no progress indicator -qq No output except for errors -d Download only - do NOT install or unpack archives -s No-act. Perform ordering simulation -y Assume Yes to all queries and do not prompt -f Attempt to correct a system with broken dependencies in place -m Attempt to continue if archives are unlocatable -u Show a list of upgraded packages as well -b Build the source package after fetching it -V Show verbose version numbers -c=? Read this configuration file -o=? Set an arbitrary configuration option, e.g. -o dir::cache=/tmp See the apt-get(8), sources.list(5) and apt.conf(5) manual pages for more information and options. This APT has Super Cow Powers. girouxn@girouxn-ThinkPad-X220:~$ On top of this, when I open Ubuntu Software Center, it opens blank for 1 second and closes right away. Can a good soul please help me understand and fix this issue? Thank you very much, Nicolas Extra info / responses thanks for the answers. @Steeldriver: here is how my line 57 looks like: deb http://archive.canonical.com/ partner What is wrong with it? @Mikolaj: here is what I get, I think it just confirms my error: girouxn@girouxn-ThinkPad-X220:~$ sudo apt-get clean [sudo] password for girouxn: girouxn@girouxn-ThinkPad-X220:~$ sudo apt-get -f install Reading package lists... Error! E: Malformed line 57 in source list /etc/apt/sources.list (dist parse) E: The list of sources could not be read. E: The package lists or status file could not be parsed or opened. girouxn@girouxn-ThinkPad-X220:~$ ^C girouxn@girouxn-ThinkPad-X220:~$ Do you guys see something wrong in my line 57? | I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that. I just tried to upload a screen shot but since I'm new it won't allow me to. I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following: COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse) E: The list of sources could not be read., E: The package list of status file could not be parsed or opened. How do I report bugs? What can be done about this. I have searched and everything everyone says to do leads me back to the same line error message. So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software. |
Can the $n-$th power of a non-upper triangular matrix be an upper triangular matrix? | I have a question regarding upper triangular matrix. I know that if AB is upper triangular then the |AB| equals to the diagnoal multiplication, but It doesn't seem to help me here. If AB is upper triangular and non-singular then A and B both upper triangular? Notice that A and B are both square. I can't choose AB = 0 becuase its signular.... |
My website has links like: <a href="messages.aspx">Messages<span>3</span></a> Well google indexes these links as: Messages3 I have read some articles for preventing google from indexing some parts of the website like <!--googleoff: index--> <!--googleon: index> tags but there are 2 problems: 1.This seems very odd to use lots of these tags and for a number <!--googleoff: index--> 0 <!--googleon: index> 2.I want to know is there a way or a rule that would work for all search engines like bing and yahoo too. | As a webmaster in charge of a tiny site that has a forum, I regularly receive complains from users that both the internal search engine and that external searches (like when using Google) are totally polluted by my users' signatures (they're using long signatures and that's part of the forum's experience because signatures makes a lot of sense in my forum). So basically I'm seeing two options as of now: Rendering the signature as a picture and when a user click on the "signature picture" it gets taken to a page that contains the real signature (with the links in the signature etc.) and that page is set as being non-crawlable by search engine spiders). This would consume some bandwidth and need some work (because I'd need an HTML renderer producing the picture etc.) but obviously it would solve the issue (there are tiny gotchas in that the signature wouldn't respect the font/color scheme of the users but my users are very creative with their signatures anyway, using custom fonts/colors/size etc. so it's not that much of an issue). Marking every part of the webpage that contains a signature as being non-crawlable. However I'm not sure about the later: is this something that can be done? Can you just mark specific parts of a webpage as being non-crawlable? |
I'm trying to recreate this product for a client in Blender. I really thought it would be a simple project, but I cannot figure it out! I'm including the blend file here if it helps: Here's how I got to this point. I didn't see an easy way to create the Dodecahedron shape so I started with a circle and changed the number of vertices to 5. I fill that shape in, duplicated it and tried my best to recreate the shape, merging vertices as I went. I then used the Cast modifier to straighten out my shape and then at each vertices, I created an ico sphere. I did try a regular sphere and also a sub-d cube, but after those attempts failed I tried an ico sphere. I then attempted to delete the faces where the bars would connect each sphere, and would try bridge loops to connect the two spheres together. But the angles I could never get right. I've also tried mirror modifiers, but it's actually kind of a difficult shape that's hard to mirror and get right. I then thought I could use the wireframe modifier on the shape and use a boolean modifer to merge with the ico spheres, it just didn't work, or at least isn't professional enough for this project. I need to make this look as close to the product as possible, including the seams. Any help is greatly appreciated! Thank you! | I've been thinking of animating some dice and while most are easy to make, I'm having some trouble figuring out a way to generate a regular dodecahedron. I could hand build it but it would be potentially uneven. Would using the base of a 5 sided cylinder and then some variation on spin be the best option or is there a better way? |
I’m looking for a fantasy series (at least 2 books) I read in the mid-80s. Most of it was set on a world without metal, so they had found other ways to make weapons. A second world, with metal, tries to take it over. I remember two main characters -brothers- on the first world, one becomes a ruler and the other is trying to learn about the second world. | This is a series my father read when he was younger (he was born in the 60s) and had me read as a kid, the book cover had the look and feel of classic fantasy novels such as the Wheel of Time series. It is set in a medieval kingdom, the premise of the book was that in the past a portal had opened up to another world and an alien race tried to invade, they were beaten back and the portal was shut. From what I remember as the series progresses another portal opens up and a war starts with said alien race. At one point in the series one of the main characters ends up going through the portal and ends up as a slave to an alien race. Where he was enslaved was akin to a plantation in a swamp (I believe). There is also a very vague memory of female assassin like character in a castle on an peninsula. Full disclosure, that detail may be from a different series/not very helpful. |
So by default the index.php is in the public directory. I want to rewrite the url so that abc.com/public/ becomes abc.com/ ?? I am very new to url rewriting .. | This question is here so we can offer users who are looking for information on how to make one or more common or basic redirects in Apache using the htaccess file. All future questions pertaining to finding information that is that is covered by the question should be closed as a duplication of this question. . Whats the point in this question? The idea while not perfect is catch the most commonly asked questions regarding redirects using the htaccess on the Apache platform either on some type of lamp or a live server. The type of answers should be generally those that you could imagine are used by 100,000’s of sites world-wide and are constantly asked here at Pro Webmasters repeatedly over and over in various forms. A few examples of the type of answers we are looking for: How can I redirect non-www to www? How can I redirect a sub domain to the main domain? How can I redirect a sub folder from domain to a root or a subdomain? How can I redirect an old URL to a new URL? A few examples of the types of answers that we are not looking for: Answers that do not involve a redirect. Any answers relating to NGinx, IIS or any other non-Apache platform. Answers that involve custom and complex string or query removals. Resources for Advanced to Complex Mod_Rewrite Rules: Please note: that this question is still in construction and may need some refining either by myself or a real moderator of Pro Webmasters, if you have any concerns or questions . |
I apologize in advance, this feels like a really dumb question but I am genuinely stuck. I get the following error: I've circled in blue my main question. Is this the character position of the error? And if so, how do I jump to it in my c# code in visual studio? | When reading a stack trace like: [FormatException: Input string was not in a correct format.] System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2755599 System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +112 System.Convert.ToInt32(String value) +68 What do the +68, +112, etc. numbers mean. I'm guessing that they're offsets to something. If so, what? |
I have multiple rows of texts and divs like this: <div> <span>Adeline</span><div style="display:inline; height:20px, width:20px, background-color: blue">hi</div> </div> <div> <span>Ted</span><div style="display:inline; height:20px, width:20px, background-color: green">hi</div> </div> <div> <span>Sara</span><div style="display:inline; height:20px, width:20px, background-color: coral">hi</div> </div> How can I make sure in each row the span and the div are vertically aligned? | I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers? <div id="header"> <img src=".." ></img> <h1>testing...</h1> <img src="..."></img> </div> |
Trying to understand what "covering a query means" with a specific example If I have a table with say 3 columns: Col1 Col2 Col3 And I put an index on Col1 and Col2 is "covering a query" determine by the columns selected in the SELECT or the columns in the the WHERE Clause? Thus : 1) select Col1, Col2 from MyTable where Col3=XXX 2) Select Col3 from MyTable where Col1=xxx and Col2=yyy 3) Select Col1, Col2 from MyTable where Col1=xxx and Col2=yyy Which of these three are truly "Covered"? | Can you explain the concepts of, and relationship between, Covering Indexes and Covered Queries in Microsoft's SQL Server? |
Hi guys good to be here. Am new to blender and am trying to learn it ASAP. Pls my blender keeps crashing when ever am at shader editor and my changes doesn't affect my mesh in the shader. Pls how do I fix these. My system specs is Intel core i7 2620M CPU @ 2.70 GHz. 8gig ram, 54 - bit Operating system. Windows 7. Thanks | Am new in Blender but it keeps crashing whenever I'am in the shader editor. My changes doesn't affect my mesh in the shader. How do I fix this? |
Let $f:(a,\infty)\rightarrow \mathbb{R}$ be a function such that $f$ is bounded in any finite interval $(a,b]$. Prove that $\lim_{x \to \infty} f(x)/x=\lim_{x \to \infty}[f(x+1)-f(x)]$, provided that the right limit exists. Thanks a lot. | Let $f:[0, +\infty) \rightarrow \mathbb{R} $ be a bounded function in each bounded interval. If $$\lim_{x \to +\infty} [f(x+1) - f(x)] = L$$ then $$\lim_{x \to +\infty} \frac{f(x)}{x} = L$$ I tried using the definition on the first limit; then, I attempted to use that inequality to apply the triangular inequality to arrive at the definition that gives me the second limit. It is supposed to be simple, but I'm not feeling safe as in how I should write it. |
If I just include existing Standard C++ class in C++/CLI program, will it work? In my tests everything worked pretty good, but is it true for every program? | Would a C++ compiler be able to compile some large sets of C++ classes without modifications? Is C++ CLI a superset of C++? |
Has allowing edit approvals on the mobile app been considered? I rarely use SE on my computer when I have free time (I'm usually working on something), so I rarely ever go through the edit approval queue. I wouldn't be surprised if that's not uncommon. If I could do approvals on the app though, I could do a few while waiting for the bus, or while in the bathroom (might as well multitask). I know I can go in through the website, but it's not very mobile/skinny screen friendly (and this is on a Note 4). | I know there are some similar posts on adding review queues to the mobile web page. However, this is regarding the Stack Exchange Android app. I really would like to review posts and edits from the Android app, however this isn't included in the app yet. I'm not sure how it would be implemented; maybe there could be a button or something for review. Could we please see this? |
If the kernel of a matrix is the $0$ vector, why is the basis of the kernel non existent? If I have the matrix $\begin{bmatrix}1 & 2\\3 & 4\end{bmatrix}$ The kernel is the $0$ vector Why is the basis of the kernel non-existent? Shouldn't the basis of the kernel be $0$? | According to C.H. Edwards' Advanced Calculus of Several Variables: The dimension of the subspace $V$ is defined to be the minimal number of vectors required to generate $V$ (pp. 4). Then why does $\{\mathbf{0}\}$ have dimension zero instead of one? Shouldn't it be true that only the empty set has dimension zero? |
While doing my homework i find out that the maximum order of an element in $S_3$ is 3 (the element $(123)$) and the maximum order of an element in $S_4$ is 4 (the element $(1234)$) Can i generalize that and say that the maximum order of an element in $S_n$ is n? | Consider the symmetric group $S_5$. I would like to find how many elements of $S_5$ are of order 5, and how many are of order 6. I would also like to determine what the maximum order of an element in this group would be. Here is what I have so far: elements of order 5 are the 5-cycles. Elements of order 6 (since a 6-cycle is impossible for 5 elements) must have at least an even cycle and a cycle of length divisible by 3, and 2 + 3 = 5, so elements of order 5 are a combination of 2-cycles and 3-cycles. How can I find the total count of such elements of order 5 and order 6, and the maximum order? I'm not entirely sure where to go from here. |
The question is to prove the following: If $n>4$ is composite, then $(n-1)! \equiv 0 \pmod n$ My attempt to prove so is the following: Since $n$ is not prime, the prime factors of $n$ lies in $(n-1)!$ yielding a term of $kn$ for some integer $k$. Hence, it is divisible by $n$ as desired. The proof seems too short, did I prove it correctly? | I have a proof and need some feedback. It seems really obvious that the statement is true but it is always the obvious ones that are a little trickier to prove. So I would appreciate any feedback. Thank you! Here is what I am asked to prove: If $n$ is composite then $(n-1)! \equiv 0 \pmod n$. Proof: $n$ is composite $\implies n=ab$ where $a,b \in \mathbb{Z}$ and $0<a,b<n$. Case 1: If $a=b$ then $n=a^{2}$. Now $n \mid (n-1)! \implies a \mid (n-1)!$, so $$\begin{aligned} (n-1)! &\equiv 1\times 2\times \dotsb \times a \times\dotsb\times (n-a)\times\dotsb\times (n-1) \\ &\equiv 1\times 2\times \dotsb\times a \times\dotsb\times -a\times\dotsb\times -1 \\ &\equiv 0 \pmod n \end{aligned}$$ Case 2: $0<a<b<n$. Then, since $a \mid n$, $b \mid n$ and $n \mid (n-1)!$ we have that $a \mid (n-1)!$ and $b \mid (n-1)!$. So this implies $(n-1)! \equiv 1\times 2\times \dotsb\times a \times\dotsb\times b\times\dotsb\times (n-1) \equiv 0 \pmod n$, Q.E.D. |
My aim: Client side: Have a block in the front page to allow any user (including anonymous users) to input their names and email addresses to subscribe the newsletter. Administration Side: being able to see the mailing list and send out newsletter to these emails. What I have got: I downloaded and enabled the follow modules: Mail System, Mime Mail, Mime Mail Action, Mime Mail CSS Compressor, Simplenews, SMTP Authentication. I am using Drupal 7 with Bootstrap theme. What I have done: I have added a new simplenews block in the front page only, styled a little bit. In permission section, I ticked both ANONYMOUS USER and AUTHENTICATED USER for 'Subscribe to newsletters' option. Problems: I input my email and clicked the subscribe button in the block as a anonymous users, there is an error: Unable to send e-mail. Contact the site administrator if the problem persists. Followed by a notice: You will receive a confirmation e-mail shortly containing further instructions on how to complete your subscription. The SMTP Authentication module doesn't work for my account because it said my php doesn't have ssl enabled, which I don't know how to do? I have enabled ssl module in my apache, but what shall I do next? Also I then see no subscribers added when I log on as an administrator later. Question: How can get let anonymous subscribe to mailing list and how can I create newsletter? Any instructions on how to achieve this? Am I using the wrong modules? | When my web form is filled and submitted, I get redirected to a page that says: Thank you for submitting. but theres a red warning box there that says: Unable to send e-mail. Contact the site administrator if the problem persists. I think its the SMTP server, but I don't know how to fix that. |
According to , class complex<double> has a default construct of the form complex (double re = 0.0, double im = 0.0);. However, I don't know if this is really correct. Could anyone explain the strange behavior of the code below? #include <iostream> #include <complex> #include <typeinfo> using namespace std; int main() { complex<double> cmp1(1, 2); complex<double> cmp2(1); //isn't the same as cmp2(1, 0.0) ? complex<double> cmp3(); //isn't the same as cmp3(0.0, 0.0) ? cout << cmp1.real() << "\n"; //=> 1 cout << cmp1.imag() << "\n"; //=> 2 cout << cmp2.real() << "\n"; //=> 1 cout << cmp2.imag() << "\n"; //=> 0 //cout << cmp3.real() << "\n"; //error (why?) //mark1 //cout << cmp3.imag() << "\n"; //error (why?) /* error message output by `mark1`: */ /* request for member ‘real’ in ‘cmp3’, which is of */ /* non-class type ‘std::complex<double>()’ */ cout << cmp3 << "\n"; //=> 1 (why?) cout << typeid(cmp1).name() << "\n"; //=> St7complexIdE cout << typeid(cmp2).name() << "\n"; //=> St7complexIdE cout << typeid(cmp3).name() << "\n"; //=> FSt7complexIdEvE } Environment: $ g++ --version g++ (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 Compiling option: $ g++ -Wall -std=c++98 <file name> | Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++? MyObject object; // ok - default ctor MyObject object(blah); // ok MyObject object(); // error I seem to type "()" automatically everytime. Is there a good reason this isn't allowed? |
How to install VB6 in Ubuntu 17.10 without using a wine, if Visual studio supports to VB6 codes then how to add extension in visual studio. | We have developed an application in Visual Basic 6 as a front end. This application requires to capture automation values from machinery to system. It captures the data using serial port. So here I would like to know first, will Ubuntu supports installing vb6 in it? If that's the case, what is the process to install and execute an application that need to be installed on Ubuntu. |
Specs for the : At 3VDC we measured 150mA @ 120 RPM no-load, and 1.1 Amps when stalled. At 4.5VDC we measured 155mA @ 185 RPM no-load, and 1.2 Amps when stalled At 6VDC we measured 160mA @ 250 RPM no-load, and 1.5 Amps when stalled. I was looking around for some motor drivers to drive 4 of those motors. I'm planning to go with the (which I already have 1 of, so I would only need 1 more) or (which I would need 2 of). I'm sure that the DRV8833 is definitely capable of driving those motors, but I'm not sure about the L293D (which would be preferable considering its price and that I need only one more) According to the specifications of the L293D motor driver on the website, these seem to be able to drive motors below 600mA, which I believe should be fine for the motors, however, it lists that it can handle a peak of only 1.2A, but the motors states that it can go up to 1.5A of current when stalled at 6VDC (not sure what stalled current means, exactly, but it's bugging me a bit). Would the L293D be just fine for this or would, say, the DRV8833 be a bit more suitable for the motors? Would appreciate any help, thanks! | This question is about the following three integrated H-bridge drivers: - or L293D (D = protection diodes added) (protection diodes included) (no protection diodes) Time after time the same question keeps coming up - someone is using one of these devices (on a low voltage, usually around 6V or less) and they are just not performing adequately. The reasons are listed further below but my question is this: - What H-bridge drivers are preferred when controlling a low-voltage motor? Information The L293 and the SN754410 are nearly identical and crucially, if you try and control a 1 amp load, you are faced with dismal performance: - The tables tell you (typical conditions) that the upper transistor drops (loses) about 1.4 volts when driving a 1A load and, the lower transistor drops (loses) about 1.2 volts when driving a 1A load. The upshot is that if you have a 6V, 1A motor and 6V battery, don't expect to see more than 3.4 volts across the motor: - \$V_{OUT} = 6V - (1.4V + 1.2V) = 3.4V\$ Worst case scenario is you might only see 2.4 volts across it. What about the L298? It's got a nice big heat-sink whereas the L293 and SN754410 are regular-looking chips. Here's what the volt drop (losses) look like: - It's the same story - for a 1A load, you can expect to lose up to 3.2 volts and, what you thought might be 6V across your motor, is at best 4.2 volts and at worst only 2.8 volts. Clearly none of the devices listed are suitable for low voltage applications where the motor might be expected to draw in excess of 0.5 amps. |
prove or disprove : Suppose that $a$, $m$ and $n$ are positive integers such that $(m, n)=1$. If $m\mid a$ and $n\mid a$, then $mn\mid a$. I think it is true statement. Let $m\mid a$ and $n\mid a$ then $mn\mid na$ and $nm\mid ma$ since $(m,n)=1$ then $mn\mid a$. Ut is short answer and I am not sure if that is it complete answer? | Using divisibility theorems, prove that if $\gcd(a,b)=1$ and $a|c$ and $b|c$, then $ab|c$. This is pretty clear by UPF, but I'm having some trouble proving it using divisibility theorems. I was looking at , and if this could be proven, then the solution would follow immediately. |
I took a video using my Sony A7iii with the AVCHD file format. I put it in Premiere Pro to trim it and I exported it as H.264 to an mp4 file. The exported video looks fine with Microsoft's Movies and TV App, but once I have imported it into Blender, the footage became distorted. Which software caused the problem and how do I fix it? | I have an issue when generating an image sequence from a video clip. Pictures 1,2,and 3 are three consecutive images from a video clip. Picture 4 is a close-up of the heel of one of them. The camera is on a tripod. As you can see there is no issue with the brick wall, but with any moving part there is. The camera is a Panasonic HDC-SD100. The clip is AVCHD 1920/1080. If I use VLC to extract the image sequence there is no issue. I use all the default settings except for the rendering resolution which I set to 100% and image compression to 0%. I have the issue with Blender 2.79b and 2.80. With this image issue it is impossible to do camera tracking. Any ideas what I need to do in order to solve this. Best regards. |
I had a quick question for all. Why do we hash the random challenge in Fiat-Shamir heuristic? If we hash the public key of Prover it should be enough for the verifier to prove non-repudiation? What is the need for hashing the first random message the prover ($x=g^y$) also? | Peggy would like to prove to Victor that she knows the discrete logarithm of $y$ based $g$; that is, she knows $x$ such that $y = g^x \bmod p$. One round of the interactive proof protocol consists of the following steps. Peggy picks random $k \in \mathbb Z/(p−1)\mathbb Z$, computes $t = g^k \bmod p$, and sends $t$ to Victor. Victor picks random $h \in \mathbb Z/(p−1)\mathbb Z$ and sends $h$ to Peggy. Peggy computes $r = (k − hx) \bmod (p − 1)$ and sends $r$ to Victor. Victor verifies that $t = g^r y^h \bmod p$. The interactive protocol can be converted into a noninteractive zero-knowledge proof by choosing and making public a collision-resistant hash function $H$, and changing the second step of the interactive protocol to the following: Peggy computes $h = H(y, t)$. Then the noninteractive proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(y, t), \qquad t \stackrel?= g^r y^h \bmod p.$$ What is the problem if in the non-interactive proof the hash $h$ depends only on $y$? That is, $h = H(y)$, and the proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(y), \qquad t \stackrel?= g^r y^h \bmod p.$$ What is the problem if in the non-interactive proof the hash $h$ depends only on $t$? That is, $h = H(t)$, and the proof consists of $(t, h, r)$, which can be verified as follows: $$h = H(t), \qquad t \stackrel?= g^r y^h \bmod p.$$ |
I need your help to get this style | How can I rename the theorem environment to proposition? In other words, I would like to print: Proposition 1 instead of Theorem 1/Lemma 1, etc Thanks in advance PS: I am using koma-script article |
Suppose I have two tex files, document.tex and content.tex document.tex: \documentclass{article} \begin{document} This is some content. \input{content.tex} \end{document} content.tex: This is some more content. Compiling with pdflatex document.tex produces the expected document as pdf. However, I'd like to create a new standalone tex file, that would look like this: \documentclass{article} \begin{document} This is some content. This is some more content. \end{document} I'm almost sure there must be a standard tool to do this, but I wasn't able to find anything. | Suppose I have a document with multiple include or input statements \input{fileA} \input{fileB} etc. Is there an easy way to generate a single .tex file where \input{fileA} is replaced by the actual content of fileA etc. without copying it manually? |
I'm having an issue with calculating the predicted linear angle a projectile needs to move in to intersect a moving enemy ship for my 2D game. I've tried following the document , but what I've have come up with is simply awful. protected Vector2 GetPredictedPosition(float angleToEnemy, ShipCompartment origin, ShipCompartment target) { // Below obviously won't compile (document wants a Vector, not sure how to get that from a single float?) Vector2 velocity = target.Thrust - 25f; // Closing velocity (25 is example projectile velocity) Vector2 distance = target.Position - origin.Position; // Range to close double time = distance.Length() / velocity.Length(); // Time // Garbage code, doesn't compile, this method is incorrect return target.Position + (target.Thrust * time); } I would be grateful if the community can help point out how this is done correctly. EDIT Here is my (working) method following the advice given: protected Vector2 GetPredictedPosition(ShipCompartment origin, ShipCompartment target, Ship enemyShip, Ship firingShip) { Vector2 targetVelocity = enemyShip.Direction * enemyShip.Thrust; Vector2 projectileVelocity = firingShip.Direction * 25f; Vector2 velocity = targetVelocity - projectileVelocity; // Closing velocity Vector2 distance = target.Position - origin.Position; // Range to close double time = distance.Length() / velocity.Length(); // Time return target.Position + new Vector2(Convert.ToSingle(targetVelocity.X * time), Convert.ToSingle(targetVelocity.Y * time)); } | I saw this question: . My situation is a little different though. My target moves, and the shooter moves. Also, the shooter's velocity is added to the bullets' velocities, i.e. bullets fired while sliding to the right will have a greater velocity toward the right. What I'm trying to do is to get the enemy to be able to determine where they need to shoot in order to hit the player. Using the linked SO solution, unless the player and enemy are stationary, the velocity difference will cause a miss. How can I prevent that? Here is the solution presented from the stack overflow answer. It boils down to solving a quadratic equation of the form: a * sqr(x) + b * x + c == 0 Note that by sqr I mean square, as opposed to square root. Use the following values: a := sqr(target.velocityX) + sqr(target.velocityY) - sqr(projectile_speed) b := 2 * (target.velocityX * (target.startX - cannon.X) + target.velocityY * (target.startY - cannon.Y)) c := sqr(target.startX - cannon.X) + sqr(target.startY - cannon.Y) Now we can look at the discriminant to determine if we have a possible solution. disc := sqr(b) - 4 * a * c If the discriminant is less than 0, forget about hitting your target -- your projectile can never get there in time. Otherwise, look at two candidate solutions: t1 := (-b + sqrt(disc)) / (2 * a) t2 := (-b - sqrt(disc)) / (2 * a) Note that if disc == 0 then t1 and t2 are equal. |
What is the least vulgar but still natural (not overly formal) of these: Bum, bottom, backside, behind, rear end... As she walked past him, he stared at her _________. | A woman's butt was allegedly touched by a man several times during a commute on the MRT. How to use butt, bottom, buttock and ass? I am confusing with these words. |
I want table rows to disappear (by animating their height to 0px and opacity to 0). I'm using the following $('#somecellelement').closest('tr').children('td').css('overflow','hidden'); $('#somecellelement').closest('tr').children('td').animate({ height: '0px', opacity: 0 },500); Where #somecellelement is something contained in cells of rows I want hidden. Opacity is animating correctly but the table row doesn't get smaller. If I set height: 500px then it works, but I need the row to disappear. I cannot remove the element from DOM, though, due to scripts expecting values from form elements in those rows. | I'm trying to add a row to a table and have that row slide into view, however the slidedown function seems to be adding a display:block style to the table row which messes up the layout. Any ideas how to work around this? Here's the code: $.get('/some_url', { 'val1': id }, function (data) { var row = $('#detailed_edit_row'); row.hide(); row.html(data); row.slideDown(1000); } ); |
I am trying to find whether any feature classes in multiple gdb's has Feature class representation. If a feature class has represenation, "RuleID" & "override" fields will be in the attribute table. So i am just checking whether these two fields are present in the attribute tables. This code is printing the results. But also returning few errors. Don't know whats the problem. import arcpy def FindField(fc,myField): fieldList = arcpy.ListFields(fc) for field in fieldList: if str.lower(str(field.name)) == str.lower(myField): print " " + fc + " contains fieldname: " + myField def FindField2(fc,myField2): fieldList = arcpy.ListFields(fc) for field in fieldList: if str.lower(str(field.name)) == str.lower(myField2): print " " + fc + " contains fieldname: " + myField2 myField = "RuleID" myField2 = "Override" dir = r'D:\Test\gdb' arcpy.env.workspace = dir gdbList = arcpy.ListWorkspaces('*','FileGDB') for gdb in gdbList: arcpy.env.workspace = gdb datasetList = arcpy.ListDatasets('*','Feature') fieldList = arcpy.ListFeatureClasses() for fc in fieldList: print arcpy.env.workspace,fc print "Searching root level Featureclasses..." print " Searching " + fc FindField(fc,myField) FindField(fc,myField2) for dataset in datasetList: arcpy.env.workspace = dataset fieldList = arcpy.ListFeatureClasses() for fc in fieldList: print arcpy.env.workspace,fc print " Searching Featureclass... " + fc FindField(fc,myField) FindField(fc,myField2) D:\Test\gdb\RT_FactGeology_Qld_25K.gdb Rio_FactGeology_Qld_L Searching root level Featureclasses... Searching Rio_FactGeology_Qld_L Rio_FactGeology_Qld_L contains fieldname: RuleID Rio_FactGeology_Qld_L contains fieldname: Override D:\Test\gdb\RT_Roads_Qld_25K.gdb Rio_Roads_Qld_L Searching root level Featureclasses... Searching Rio_FactGeology_Qld_L Rio_Roads_Qld_L contains fieldname: RuleID Rio_Roads_Qld_L contains fieldname: Override Runtime error Traceback (most recent call last): File "<string>", line 31, in <module> File "<string>", line 6, in FindField UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 7: ordinal not in range(128) | I have done it many times (clipping a raster with a polygon layer or by extension) but today I got an error for the first time and I don't know how to solve it. I am always using the same type of raster layers. When running the clipping tool I got the following message: gdal_translate -of GTiff -ot Byte -projwin 410282.185971 4694950.41162 410783.882475 4694524.96815 -co COMPRESS=DEFLATE -co PREDICTOR=1 -co ZLEVEL=6 -co TFW=YES "C:/Users/FERRAN ALA/Desktop/Justificació Fontanals/QGIS/Topo 1_5000/bt5mv20sd0f283077st1r031.sid" "C:/Users/FERRAN ALA/Desktop/Justificació Fontanals/QGIS/background/image.tif" GDAL command output: 'ascii' codec can't encode character u'\xf3' in position 201: ordinal not in range(128) See log for more details Does anybody know what that is? |
I know there is lots of information on this around, but I still find it confusing. Please help me with this quick one liner. What do I need to write and where to make this a permanent feature of my system? This is the command: sudo apt update &&\ sudo apt upgrade -y &&\ sudo flatpak update &&\ conda upgrade --all -y Maybe call it with sudo updateall Slight digression: I asked a question about upgrade appimage and snap a while ago. There exists appimagehub but it pooly supported at the current time and snap by design updates without user involvement and there is no way to change this I believe. The others here can be manually updated. | If you create an alias for example: alias cls="clear" It exists untill you kill terminall session. When you start a new terminal window the alias doesn't exist any more. How to create "permanent" alias, one that exists in every terminal session? |
there are just %90, %75, and smaller values %90 setting is too big and %75 setting is too small for me. How can i set chrome default page zoom setting to %80? edit: chrome version : Version 31.0.1650.57 mac os x Version 10.9 screen resolution : 1920 x 1080 | In IE 9 you can type in whatever number you want to get the perfect zoom but in Chrome all I see is the + and - in the drop menu. How do I choose a custom zoom and set it as the default? |
Consider the phrase: You have come one (if not many) times to my house ... I am not sure if the noun "times" should be plural or not. It sounds better with plural, but states that parenthesis are used for things which can be safely removing without affecting the meaning of the sentence. In that sense, if you get rid of the info in parenthesis the singular should be used. Is there a canonical answer here? has just one answer, which to be honest is not very helpful (and has just one vote). Also, my question has the extra issue of having a parenthesis, which surely makes it distinctive from the one linked above. | If a set of parentheses lies between a subject and its verb, and the parentheses contain an substitutive subject whose singularity/plurality disagrees with the original subject, whose singularity/plurality should be chosen for the verb? In other words, in the following example, should "questions" (and its verb "are") be singular, or should they remain plural as shown? Many (if not every) questions on this StackExchange are answered. My intuition tells me that the two words in question should remain in plural forms, since the text in parentheses only interrupts the sentence (and the sentence would be grammatically incorrect if everything in parentheses were removed and the words were in singular form). On the other hand, when read aloud (assuming one reads the text in parentheses), this has an uncomfortable sound to it, and I've seen others write in what would be the above example's singular-form case, so I'm curious to find out which is correct. And, thinking about it, I suppose the same question would apply when commas are used in place of parentheses. |
I accidentally started to write to my Seagate 2TB HDD. I now find it doesn't mount though it does show up on gparted, Partition - Unallocated, File System - Unallocated, Size - 1.82TB BTW I have downloaded and made bootable disks of Knoppix 7, Systemrescue 6.0.3,and GParted Live but am not having much, in fact any, success so far. How can I mount the drive and hopefully recover the data? | I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions (C:) Vista (D:) Entertainment (E:) Work (F:) Sources and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB. I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse? I need these data badly as I don't have a backup for them. |
whether dirac delta function a well behaved function? Can u please explain the properties of a well behaved function..? | Is Dirac delta a function? What is its contribution to analysis? What I know about it: It is infinite at 0 and 0 everywhere else. Its integration is 1 and I know how does it come. |
I have a website that is translated in various languages including French. These pages aren't using Google Translate or any other third party script to do the translations. They have been manually translated. So on the French's contact us page, I have a php contact form for visitors to fill in. There's french text on the contact us page and I have no problems with character encoding unlike the image below. When the form has been filled in successfully, an automatic message pops up BUT because the french language has special characters, those special characters in the success message have diamond shaped boxes with question marks in it: MY CODE: In the header of my contact page I have: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> In my PHP form which generates the success message (obviously javascript is used to display the message), I have (this is just a snippet of my entire php code however I think this part is what matters most): $msg = wordwrap( $msg, 70 ); $headers = "From: $email\r\nBCC:{$bcc}\r\n" . PHP_EOL; $headers .= "Reply-To: $email" . PHP_EOL; $headers .= "MIME-Version: 1.0" . PHP_EOL; $headers .= "Content-type: text/html; charset=utf-8" . PHP_EOL; $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\r\n" . PHP_EOL; if(mail($address, $e_subject, $msg, $headers)) { echo "<div class='success'>"; echo "<h6>Nous vous remercions de votre demande.</h6>"; echo "<p><strong>NB:</strong> Si vous n'avez pas reçu une réponse dans 24 heures, veuillez vérifier votre <u style='font-weight:bold'>boîte spam</u>.</p>"; echo "<div class='close'>&nbsp;</div>"; echo "</div>"; } else { echo 'ERROR!'; // Dont Edit. } Note in the code above: $headers .= "Content-type: text/html; charset=utf-8" . PHP_EOL; I suspect and assume that this is where my problem lies: charset=utf-8 WHAT I'VE DONE IS: 1) I've tried changing my contact page's http-equiv="Content-Type" to <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 2) and in my php header: $headers .= "Content-type: text/html; charset=iso-8859-1" . PHP_EOL; These changes don't work and unfortunately my research on SO isn't getting me closer to a solution (considering everyone's situation is a little different than to perhaps mine). I'm not sure if this header is of any concern?: $headers .= 'Content-Transfer-Encoding: 8bit'. "\n\r\n" . PHP_EOL; I appreciate your help and guidance. | I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur? This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2. |
Is there any go-to method for getting good exposure of both sky and land in landscape photography in broad daylight landscape photography? I've noticed that in my dlsr and smart phone, I'm typically able to expose one or the other, but not both. However, I feel like I've seen a number of images that have nice clouds, gradations of blue, along with pretty trees, nice fields, etc. Are these done with multiple exposures? Or filters that reduce the brightness of the sky? Is there a go to method it is it catch as catch can? | I have spent some time photographing landscapes with blue sky and white clouds, but the clouds always come out overexposed. I have tried different settings and still have the same result. What should I do to get correct exposure? |
I have an Iranian passport and my round trip flight from San Francisco (SFO) to Istanbul (IST) has a stop in Amsterdam, The Netherlands for eight hours. Do I need a transit visa? How is the application process and how long it generally takes to get a transit visa? Do I need to get a separate transit visa for the return flight? | I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows: Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland |
As the title says: how can I find the subgroups of $S_n$? I know that $S_n = <(1 2), (1 2 .. n)>$ and $S_n = <(1 i): i = 2, 3, .. n>$. But how do I find all subgroups? And how do I know their orders? | I am implementing an algorithm which finds every subgroup of given group. Here's my algorithm. Let $G$ be a group of order $n$ with elements $g_1,\cdots,g_n$. Then I consider each $\langle g_i\rangle $ which are all cyclic subgroups of $G$. Of course, if $\langle g_i\rangle =\langle g_j\rangle $, we append only $\langle g_i\rangle $ into our result set. We call all distinct subgroups of the form $\langle g_i\rangle $ to be the first-generation. (Note that the number of the first-generation subgroups is at most $n$.) To get $(i+1)$-th generation from $i$-th generation inductively, we construct the subgroup $S$ from each two elements of $i$-th generation $S_1, S_2$ to be $$S=\langle S_1,S_2\rangle .$$ Obviously, if generated subgroup is already in previous generations, we do not call it $(i+1)$-th generation, hence every subgroups of $G$ has the unique generation number. We do this construction until the number of the typical generation subgroups to be $0$, since we get all subgroups of $G$. This works perfectly to any groups, but unfortunately, it is not fast although I implemented additional steps to avoid repeated computation. So I searched some other algorithms but they are all vague to understand. One of the algorithm is called the cyclic extension algorithm, but I can not get it easily unless I have studied some backgrounds for this method. If you have enough knowledge about the cyclic extension algorithm or some other algorithms, please give me an easy explanation. I am in undergrad. course of math dept. Thanks. |
I just have a problem with a sum in php. My data are : $t = array('-100.80', '-0.01', '-7.99', '-108.00', '-10.80', '-34.90', '-10.80', '-18.80', '-17.80', '-19.50', '-33.60', '-32.10', '-27.50', '-40.30', '-31.20', '-10.60', '-27.50', '-120.00', '-130.00', '100.80', '0.01', '7.99', '108.00', '10.80', '34.90', '10.80', '18.80', '17.80', '19.50', '33.60', '32.10', '27.50', '40.30', '31.20', '10.60', '27.50', '120.00', '130.00'); Total is normally 0 but if i execute an array_sum i just have : -5.6843418860808E-14 If i add manually with floatVal() i just have the same result. Could you explain me why i don't have 0 in result ? Thanks. Regards, | Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen? |
When you take an action in front of a companion, that companion may like or dislike that action which affects your relationship with them. This is accompanied with a message stating something like "[xy liked that.]". Depending on the companion, they can react to actions such as stealing, entering Power Armour, Picking a lock etc, but recently whenever I performed any such actions, there was no pop up. This issue has been present for two days, nor is occurring due to an affinity change cooldown. I have picked two locks in front of Piper in close time intervals, and neither such actions resulted in a popup. This is not caused by any cooldown, and occurs with any of my companions regardless of affinity status. Restarting my game and even my console DID NOT fix anything. I have read the question however it is asking about the cooldown and doesn't address this bug. I am playing Fallout 4 for the Xbox One. Is there any way I can fix this issue? | You have probably noticed that messages will pop up whenever the Sole Survivor does something to increase the companions affinity. For example if you pick a lock the message will read "Piper liked that" if she is your companion. However, I noticed that this message does not appear all the time, there rather seems to be some kind of cooldown time intervall between messages. That is, whenever I pick two locks in short succession there will be no second message after the first. Does that mean that affinity is unaffected by the second action? Is there some sort of cooldown phase? Or is it just the message? |
Good morning all, I recently made a post on this website regarding a login page for a website. It was pointed out to me that I was very vulnerable to an SQL injection. I have spent the past weekend researching into SQL injections and I am getting a bit of a better idea about how they function, however I am still very new to PHP (I taught myself the basics in a day). I was wondering if anyone could help me with my code please. I have read every link that people posted and researched it till my head exploded (no need to edit, its not literal), but I am still struggling as to the code itself. Here is my code: <?php session_start(); // dBase file include "dbConfig.php"; if ($_GET["op"] == "login") { if (!$_POST["username"] || !$_POST["password"]) { die("You need to provide a username and password."); } // Create query $q = "SELECT * FROM `dbusers` " ."WHERE `username`='".$_POST["username"]."' " ."AND `password`=PASSWORD('".$_POST["password"]."') " ."LIMIT 1"; // Run query $r = mysql_query($q); if ( $obj = @mysql_fetch_object($r) ) { // Login good, create session variables $_SESSION["valid_id"] = $obj->id; $_SESSION["valid_user"] = $_POST["username"]; $_SESSION["valid_time"] = time(); // Redirect to member page Header("Location: members.php"); } else { // Login not successful die("Sorry, could not log you in. Wrong login information."); } } else { //If all went right the Web form appears and users can log in echo "<form action=\"?op=login\" method=\"POST\">"; echo "Username: <input name=\"username\" size=\"15\"><br />"; echo "Password: <input type=\"password\" name=\"password\" size=\"8\"><br />"; echo "<input type=\"submit\" value=\"Login\">"; echo "</form>"; } ?> Now I know it needs validation AND sanitisation in PDO, am just struggling as to what to actually write in my code. I am hoping that someone could help rather than just link me to another page please as an edit, if anyone has a link to a tutorial about logins which are SQLinjection safe that could help me/other people looking to protect against that would be much appreciated. Thanks | 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? |
I have a very particular problem at hand. Brief introduction: I have two columns at a database that I need to "group concatenate", in MySQL I would simply use GROUP_CONCAT to get the desired result, in SQL Server 2017 and on I would use STRING_AGG, the problem that I have is in the SQL Server 2012, which doesn't have this function. Now, under normal circumstances I would use FOR XML PATH('') to get the solution, this is not viable since I'm running the query from the editor inside a third source application, the error that I get is FOR XML PATH('') can't be used inside a cursor For the sake of the argument let's assume that it's completely out of question to use this function. I have tried using recursive CTE, however, it's not viable due to execution time, UNION ALL takes too much resources and can't execute properly (I am using the data for reporting). I will no post the screenshots of the data due to the sensitivity of the same, imagine just having two columns, one with an id (multiple same id's), and a column with the data that needs to be concatenated (some string). The goal is to concatenate the second columns for all of the same id's in the first columns, obviously make it distinct in the process. Example: Input: col1 col2 1 a 1 b 2 a 3 c Output: col1 col2 1 a/b 2 a 3 c Does anyone have a creative idea on how to do this? | 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 :) |
Hi I just got the new Asus N552VX and am trying to get Xubuntu working on it. I have tried both the 14.04 LTS and the 15.14. However in the install I get ACPI PCC probe failed, sometimes it just crashes right there and sometimes it keeps on going but seemingly random freezes up and wont do anything until I restart. I googled that one and to my knowledge there seems to not one ACPI-driver that fits this particular laptop. I have gotten as far as installing and booting into the OS but the mousepad and keyboard won't work and after a restart it won't boot into xubuntu again. So has anyone else got ubuntu working on the asus N552VX? Footnote: When it freezes I can't seem to get an error message, I know you can tap the right arrowbutton to see verbose output (of some sort) but I can't indentify the problem. | All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when... just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an In what order should I try various solutions before deciding to pull the power plug? What should I do when starting up Ubuntu fails? Is there a diagnostic procedure I can follow? |
I will be applying for Ph.D programs in mathematics and hence I'll be needing letters of recommendation from my professors. There are two or three professors with whom I have a lot of academic interaction and which are also famous in their research areas. As such, having a recommendation letter from them can significantly increase my chances of selection. Now my question is: Since I’ll be applying to 5–6 universities, is it appropriate to ask for that many recommendation letters from the same person? If not, then how many recommendation letter is considered to be “normal number” to ask for? I would be very happy if some of the professors here, who themselves write recommendation letters can tell their experience. | When applying for post-doctoral and faculty positions you are typically asked for three (sometimes more) reference letters to support your application. Given that it is competitive out there, it also makes sense to apply for all positions that are good matches to your qualifications and career development goals (in the case of post-docs). Sometimes this may mean asking for several reference letters (or pre-application "can you support me if required?" requests) in a short space of time. Also, there may only be a small pool of people (i.e. 3 or 4) who know your work sufficiently well to give an excellent reference. I have also been told that referees want to help you out, and that there is no reason to fear asking them. And, that in many cases once a letter is written it can typically be quickly repurposed. But there must be a breaking point. How do I manage this without being disrespectful? How many requests in a given unit of time is too many, or harms my credibility? I am asking this question in this forum, as I am interested in the norms in the academic world, which are often somewhat different than the rest of the working world. |
I have been handed a PILZ flash drive from my friend, because it is apparently broken - indeed, it is. Connecting it to my computer instantly installed it's driver as a "XXXXXXXX U177CONTROLLER" device with 0MB of space, trying to view it results in a "Please insert media" message from Windows. I've read around, and found no fix for almost 2 hours now and I'm left totally clueless. | I have a USB flash drive which is no longer recognized by my computer. Windows Disk Management and DiskPart report No Media with no storage space (0 bytes) on the drive and I cannot partition or format the drive: If the drive appears in Windows Explorer, trying to access it returns an error message indicating that there is no disk inserted, such as the following: Please insert a disk into drive X:. Various disk partitioning and data recovery utilities don't recognize the drive or only give a generic name for the drive and cannot access the contents of the drive. What can I do? How do I recover data from the drive? This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details. |
What effect do bright lights have on DSLRs? For example, would shining a flashlight into the lens have any effect? The flashlight I am currently using is 300 lumens. | I'm about to start exploring the world of long exposure shots, using my Canon EOS M. The camera has a standard max exposure time of 30 seconds, but in bulb mode I can keep the shutter open indefinitely (using a wireless remote to control the shutter.) How long can I leave the shutter open without running the risk of prolonged exposure to light damaging my sensor? For the purposes of this question assume I'm shooting in summer daylight, so that we can go by the worst case. |
I have spent hours reading, formulating practice questions, using grammar check, and studying research papers. I have taken a break from Stack Exchange for probably 4 days, hoping that this will refresh the quality in my questions. But, this strategy has failed. I'm baffled right now, because I took into consideration of what other users have mentioned. And, it indeed improved my question quality. Question What other strategies should be used as this strategy no longer works? | If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see: We are no longer accepting questions from this account. See to learn more. Likewise, for answers: We are no longer accepting answers from this account. See to learn more. Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked? |
For simplicity, we have the following tables Teachers Students Let's assume that each teacher has many students (and not the other way around, let's assume that each student has only one teacher). How do I display the data such that: Col 1 - Teachers - Students Row 1 - Teacher A - Student A, Student B, Student C Row 2 - Teacher B - Student X, Student Y, Student Z | 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 :) |
This question came up recently: John III, the third king of Johnland was very angry with John II, who killed the founder of Johnland, the beloved John I. By his new law the digit $2$ was forbidden to use. The numbers were listed as $1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, $$ 15, 16, 17, 18, 19, 30, 31, 33, \dots $ What was the $2021$st number in this new system? I then came up with this: Sol.: First, I studied how many numbers would be ‘skipped’ in the system within a power of 10; 100: 0 101: 1 102: 20 103: 300 104: 4000 105: 50000 The pattern is quite clear. Skipped numbers before 2021st number: 300 x 2 + 1 x 2 + 0 x 1 = 602. However, in 602 there are some skipped numbers: (300 x 2 + 1 x 2 + 0 x 1) + (20 x 6 + 0 x 2) = 602 + 120 Also in 120 there are some more: (300 x 2 + 1 x 2 + 0 x 1) + (20 x 6 + 0 x 2) + (20 x 1 + 1 x 2) = 602 + 120 + 22 And in 22: (300 x 2 + 1 x 2 + 0 x 1) + (20 x 6 + 0 x 2) + (20 x 1 + 1 x 2) + (1 x 2 + 0 x 2) = 602 + 120 + 22 + 2 There are none in two. From there I didn't know what to do with myself and just got the answer in python, but that's cheating, so I would like to know how I can hope to solve this question with pure maths. Cheers! | A man counts numbers and skips the numbers that have digits divisible by 3. The first ten numbers are 1, 2, 4, 5, 7, 8, 11, 12, 14, 15. What is the 100th number? Quick googling for solution gives an interesting alternative method using change in base: Its actually base 6 system, So $100$ in base 6 is $244$ in decimal. But as $3$ is not included in the system, 4 will actually be 3, 5 will be 4, so on, Hence $100th$ number is 255 Can someone explain this please? I tried same method on similar question, to find $100th$ number for the sequence that skips digits divisible by 2 or 5. 100 in base 4 is 1210 and reconverting it back yields 1310. Which is wrong. Many thanks in advance, Chris |
If I say "here's some tips", is that correct? Doesn't sound right to me. I would have thought it should be "here are some tips". | A phrase I came across tonight was "Here's the good news and the bad news." Trouble is, "Here's" means "Here is", and "is" is meant for one thing, not two things. I'm describing two things. However, "Here are the good news and the bad news" sounds bizarre. What to do? |
So here is my issue - I submitted my thesis 2 years ago and it was accepted and i was granted the M.S. degree (I am in the US, BTW). Now, when I opened it to read some portions, I found some missing references to data tables, and otherwise some typos. I am starting to freak out about this, because of the consequences. My question is this - can the university somehow "re-evaluate" my thesis and find it unacceptable? I am not sure about how it works in academia, any help would be appreciated. Edit: My question is bit different than the others, as it is asking whether the university has the power to "re-evaluate" my thesis based on typos and omissions. | I've just defended my PhD in mathematics and started a postdoc. While working on an improvement of one of the results of my thesis, I realized that there are several minor mistakes and a big bug in a proof that invalids a minor result in the thesis (about 3-4 pages out of 110). Unfortunately neither I nor my advisor or referees figured it out the mistake. Though the result is minor, it is announced in the introduction and the manuscript is on-line on an ArXiv-like server, so that I could publish a new version but not cancel the one on-line. What is the best thing to do? Upload an errata? Upload a "revised" version of the thesis? Publish a "revised version" of the thesis on my web-page? Can this damage my future career, making me look not "reliable" as a researcher? |
Looking to add some functionality when users double click on a div to pop up a box. I already have the pop-up functionality which works with inline onClick(). But I would like to change this to double click. I have tried the following which will work if invoked after an element is added. $(".dz-preview").dblclick(function() { console.log("inside dbl"); renameFile(this); }); But I cant seem to figure out how to get it to work on dynamically generated elemenets. | I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option. |
So I'm having this assignment in probability regarding conditional probability that states the following: Each of 25 exams papers has 2 questions written on it. Neither of the 50 questions repeats itself. The student knows the answer for 44 questions. In order for the student to pass the exam he must answer correctly either on the two questions for the paper he has chosen or on one question on the first paper he has chosen and on the first question on the second paper he has chosen. What is the probability that the student will pass the exam? Any ideas? Any sort of help will be appreciated. Thank you in advance! | There're $25$ tests, each with $2$ questions. There're total of $50$ different questions (the questions do not repeat). The student knows the answer of $44$ questions. To pass the exam, the student needs to correctly answer both questions on the first test he drew, or answer $1$ question from the test he drew first, and $1$ question from the test he drew second. (meaning he draws twice if he answers a question incorrectly on his first try) What is the probability that the student will pass the exam? I have never faced a problem like this one so any help is appreciated. I was thinking about approaching it "manually" with some applied combinatorics but I feel like there's a much easier way that I am not familiar with. |
I want to highlight the code in comment box, How can do this. I want to highlight my syntax code highlight in comment field | What special formatting tricks can be done in the comments now? Proven: **text** or __text__ = Bolding = text *text* or _text_ = Italics = text `text` = Code Formatting = text [example](http://example.com "title") Inline links with title and text http://example.com plain old links Disproven: Cannot insert <kbd> (i.e. F12) characters Cannot use #[text] to increase size |
LaTex Compiler thinks that "_" in biblio file is a mathematical expression that represents the beginning of subscript letter. Which library should I use or what should I do? My sample code is as follows: \begin{filecontents*}{example.eps} gsave newpath 20 20 moveto 20 220 lineto 220 220 lineto 220 20 lineto closepath 2 setlinewidth gsave .4 setgray fill grestore stroke grestore \end{filecontents*} \RequirePackage{fix-cm} \documentclass[smallextended]{svjour3} \smartqed \usepackage{graphicx} \journalname{Journal of Cryptographic Engineering} \usepackage[acronym,toc,shortcuts]{glossaries} \usepackage{amsmath} \usepackage{graphicx} \usepackage{lineno} \usepackage{array} \usepackage{longtable} \begin{document} \cite{10.1007/3-540-44983-3_4} \bibliographystyle{spmpsci} \bibliography{biblio} \end{document} My biblio file is as follows: @InProceedings{10.1007/3-540-44983-3_4, author="Aoki, Kazumaro and Ichikawa, Tetsuya and Kanda, Masayuki and Matsui, Mitsuru and Moriai, Shiho and Nakajima, Junko and Tokita, Toshio", editor="Stinson, Douglas R. and Tavares, Stafford", title="Camellia: A 128-Bit Block Cipher Suitable for Multiple Platforms --- Design and Analysis", booktitle="Selected Areas in Cryptography", year="2001", publisher="Springer Berlin Heidelberg", address="Berlin, Heidelberg", pages="39--56", isbn = "978-3-540-44983-6", doi = "10.1007/3-540-44983-3_4" } | I'm trying to include a link to some code on OneDrive; the link includes an underscore, which is causing a lot of trouble. I tried adding the entry like this: @misc{code, title = {Code}, url = {https://1drv.ms/link_link} } I use \usepackage{url} and \bibliographystyle{IEEEtran}. Everything compiles fine and the bibliography shows the correct entry. However, if you click the link, it opens a page at https://1drv.ms/link - so ignoring the underscore and everything after it, which leads to a wrong page. Even copy and paste from the PDF doesn't work since the underscore is copied as space, which again is a broken link. How can I add the link such that it can be clicked and copied properly? I tried \_, \usepackage{underscore}, {{link}}, different bibtex entries but nothing worked. Also all the related questions/answers don't answer mine. |
Question: If I have a non-zero polynomial $P(x_1,\ldots,x_n)$ defined on $\mathbb R^n$, is it true that the zero set $$Z(P) = \{x \in \mathbb R^n: P(x_1,\ldots,x_n) = 0\}$$ can be written as finite union of smooth submanifolds of $\mathbb R^n$? This is probably a very basic thing of real algebraic geometry, but I'm totally ignorant in the area. If the response is affirmative, can anyone provide a reference? | Can we write every semi-algebraic set $A \subset \mathbb{R}^m$ as the disjoint union of finitely many Nash submanifolds of $\mathbb{R}^m$? By Nash submanifolds are meant those manifolds that are smooth and semi-algebraic. |
How can I create a @pattern regexp for pp-gfg76482_8498680983? Thanks in advance. | I don't really understand regular expressions. Can you explain them to me in an easy-to-follow manner? If there are any online tools or books, could you also link to them? |
date_format = "%Y-%m-%d %H:%M:%S:%f" max_timestamp = datetime.strptime(str('2018-09-28 16:01:09+00:00'), date_format) I have tried datetime conversion string to datetime but got error this is not a correct format. What is the exact format for this date? | 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? |
I have a question regarding the usage of articles. What is the difference between "a" and "the"? Why do I need to use "a" in "that was a winter I"ll never forget."? Can I use "the" instead? Also, why do I need to use "the" in "that was the winter we went to Norway"? Thank you very much!!^^ | I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize? The standard rule you always hear: “If a person knows which item you are talking about then use "the" . . . doesn’t clear things up for me, as I have no idea whether or not they know. |
How can we give a meaning to the three axioms of prepositional logic? As axioms, is not it supposed to be obvious? For example, how is $(\phi \to (\psi \to \chi)) \to ((\phi \to \psi) \to (\phi \to \chi))$ evident? | How might I go about getting some intuition on the typical axiom schemes given for propositional logic? They seem rather mysterious at first glance. For example, these are taken from: $\phi \to \phi$ $\phi \to \left( \psi \to \phi \right)$ $\left ( \phi \to ( \psi \rightarrow \xi \right)) \to \left( \left( \phi \to \psi \right) \to \left( \phi \to \xi \right) \right)$ $\left ( \lnot \phi \to \lnot \psi \right) \to \left( \psi \to \phi \right)$ |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.