How to cope with desires when my wife is away?

Question: Salam.
My wife is currently studying overseas and i can only see her when she comes back home twice a year and when i visit her. We just got married early this year. She stayed with me and we were very intimate for 6 months before she went overseas alone. Sometimes my sexual needs are overwhelming but I usually can control it by distracting myself with work/praying, etc. Recently, I feel pain and aching in my scrotum which prevents me from focusing at work. I can ignore my desires and thoughts but not the physical pain. This is the first time I am experiencing this and i do not know how to handle it. Usually when i have strong desires, i get wet dreams and i feel slightly better the next day but this time, it didn't happen which i believe led to this aching feeling. I have done my research and many non-Muslim websites suggested masturbation. I have never done that and will never resort to it. I would like to know other ways to cope with this.
Comment: May I know your age and your wife's age?
Comment: i am 24 and she is 22
Answer: Assalamualaikum brother, Welcome to our community

Masturbation is haram brother. and about your wife, if you are married and your wife is not near you, you can have another wife, who can stay with you (Ideally, its of no use to marry and stay away from each other) as it leads to fitna. husband and wife are supposed to stay together , so they can fulfill each others desires. Nothing is more important that fulfilling each others desires. i am not sure why your wife left alone leaving you alone (this is not acceptable) unless there is situation of life and death or you have serious issues, out of which there is no way
About your sexual desires, if you choose any other haram way (masturbate, watch porn, or any other way,) then you will destroy your married relationship. which is very bad
talking about solution? you should better talk to a doctor about the pain. Because as far as i know, sexual desire can never cause pain in genitals.

Best is that you must call your wife to stay with you. otherwise it will be fitna for you and your married life can be in danger too
May Allah help you in all your problems
Comment: That's a selfish advice.
Comment: Salam brother. She was already studying overseas when we met (technically we met in university but i graduated first). I don't blame her because i felt that it would be unfair for me to stop her studies halfway because i had to move back to my country. She did not intend to marry while she was studying due to the long distance relationship but i insisted because i felt that i would be haram for me to frequently visit her there if we were not married.
Comment: Right now still you have to call her back. nothing is above or beyond marriage. Call her back and explain her that you need her.
dont feel anything bad. marriage Must be saved, no matter what
Comment: @Medi1Saif i hope you have a better solution.
Comment: Well IMO they shouldn't have got married in first place. He may apply for a job and stay close to his wife until she finishes studying. Beside this there's no consensus on masturbation being haram and with fast and sports one may overcome these urges and Islam is not expecting us to be like animals who just need to fulfill their desires anytime anywhere.. And there's a marriage contract to respect....
Comment: What is done is now past. and past cannot change now. so you will suggest brother to masturbate ? (claiming its not haram) ? thats your solution?
as the marriage is now done, what is most appropriate solution in this situation? he should continue to fulfill his own desire alone? till she comes back after few years?


Dentrix G4 dat file

Question: I am trying to read data from appt.dat file for Dentrix G4 version. It seems that the schema has changed from G3 to G4 version. Can somebody please help?
Answer: I first like to introduce myself (per moderator request) as a Dentrix Developer Partner. I do not work for Dentrix, I'm an authorized 3rd-party Dentrix developer. I also like to state very clear that is not my intention to get any profit out of the information I like to share with you.
Reading data from a Dentrix G4 database or older versions is really complicated. In fact is not officially supported by Dentrix. However you can possibly manage by using an Hex Editor or something, but you really have no easy way to do it with an API or an SDK since Dentrix doesn't provide those for G4 and older versions. On top of that, using any method of reading the database without Dentrix's approval could fall into a HIPAA violation and you could get yourself in real trouble.
Also, Dentrix G5 just came out early in 2012 and they implemented encryption to the database itself so at this point a Hex Editor would be out of the question, but not everything is lost.
On the other hand, on Dentrix G5 the database structure changed again, but this time for good. Dentrix G5 finally uses an SQL database engine that allows you to query the data in a much easier way.
The engine they use is ctreeACE SQL.
Much better, they now provide APIs and SDKs for developing purposes which allows you full access to the database in read-only mode.
If you like to get a hold on an API, I recommend you to go to http://ddp.dentrix.com for more information.
Once again, I like to state very clear is not my intention to get any compensation from sharing this out since I don't get any benefit from it anyways. Reason for this is the API implies a cost (is not free).
I truly hope you find this information useful.
Good luck.
Answer: Trixi from Open Dental might be able to dump it to a comma delimited file.. If you can find it. =) Someone also wrote a ODBC driver but the site is now down.. Most likely a former dentrix employee, as he posted from American Fork.
Answer: Can you connect to the ctreeACE SQL engine and write data, by SQL insert or something?
Comment: Looks like you really can't since the SDKs appear to be limited to read-only access. Therefore an SQL Insert, Update, Delete or anything that needs write access into the raw data is restricted.
However I've heard Dentrix is considering to implement SQL Stored Procedures that will allow write access to specific tables into the database. So that means an SQL Insert will still be restricted but in the future you may have write access via SQL Stored Procedures.
Answer: I had to do the same thing. The data is stored in fixed width columns, fixed length rows. Once you identify your layout, you can then parse the data. I think this video (https://www.youtube.com/watch?v=OMeghA82kSk) is me going through a sample SoftDent database, or Dentrix G4. On the bright side, once you figure it out for Dentrix G4, the definitions for Easy Dental is nearly identical.
For Dentrix G4, there is no ODBC driver, everything Dentrix uses to read data is embedded into Dentrix. There is no way to access the data short of parsing it. Data is stored in a mixture of binary and ASCII and will have to be converted for each record.
It will end up being something like this:
<code>{
  "file": "APPT.DAT",
  "Offset": 2989,
  "LineLength": 332,
  "data": [
    {
      "Column": "AppointmentId",
      "StartingPosition": 1,
      "ColumnWidth": 3,
      "DataType": "LEInt"
    },
    {
      "Column": "Date",
      "StartingPosition": 5,
      "ColumnWidth": 4,
      "DataType": "DTXDate"
    },
    {
      "Column": "RscType",
      "StartingPosition": 9,
      "ColumnWidth": 1,
      "DataType": "LEInt"
    },
    {
      "Column": "OperatoryId",
      "StartingPosition": 10,
      "ColumnWidth": 4,
      "DataType": "String"
    }
}
</code>
If you are only trying to get access to your own data, ReminderDental's database integration can export the top 16 tables to an SQLite database. If you are trying to develop a commercial solution, then hopefully you will find this helpful.

Dentrix G4 dat file


Assisted manual levelling with Marlin

Question: Marlin offers a bunch of different choices for auto-levelling and assisted manual levelling for bent build plates (mesh levelling), but for the moment I want to level things completely manually.
That is, I want to move Z to 0, disable steppers, and then move around the print head and adjust the distance between bed and nozzle at various points with a piece of paper.
With the old Repetier based firmware on my printer, selecting "home all axes" did not only home XYZ to endstops, but it also moved the head to position (0, 0, 0) afterwards. Then I could simply disable steppers via the menu and go on with my levelling. Note that in my case, the coordinates of the endstop positions are negative for all axes, so moving to the endstops alone isn't cutting it.
With Marlin, selecting the "auto home" option merely moves to the endstops and then to some positive Z position (+10). This means I have to use the menu to manually move Z back to 0, which is quite inconvenient, unless I have a PC nearby that allows me to enter G-code.
So, that leaves two related questions for me:
Is there some simple way to move to (0, 0, 0) with the menu?
Can I implement an assisted manual levelling (i.e. some procedure that simply moves the head between a number of different X/Y positions) easily? Does something like that already exist? If not, I wonder why.
Comment: If you move the print head manually (steppers disabled), the firmware will not be able to know its position, which is required for mesh leveling. If you just want to level corners, theres an option for that in `Prepare`. If you want to add *specific* points to the mesh easily, now thats a question!
Answer: Write a few pieces of gcode to do this. Place it on an SD-card (I assume you have a reader) and select the file you want to execute.
Home all:
G28
G1 Z0

Do you really want to home it directly? I would say you want to take it down slowly and adjusting end-stops incrementally.
First:
G28
G1 Z10

Then
G28
G1 Z3

Then
G28
G1 Z1

etc etc
You can also move it around in the X and Y plane:
G28
G1 Z5 X50 Y30

Answer: The way I manually level my bed is by connecting a computer to the printer via USB. As far as I am aware, if you have a touchscreen this should be available on the printer options as well for marlin.
But if you connect a computer, simply run something like pronterface or any other manual control gui and:
1) home axes
2) disable motors
3) move printhead in x/y directions as necessary by hand
4) adjust z height manually with the GUI software. This should not affect your x/y positions or turn on their motors.

Assisted manual levelling with Marlin


Always allow microphone usage in Google Chrome

Question: Is there a way to always allow Google Chrome to use my microphone and camera for a certain site?  I like using the new Google Voice Search but whenever I click the mic button it asks if Chrome is allowed to use my mic, how can I set it to always allow?
Comment: I don't think that there is a way. It's a security thing.
Answer: If you are connected to the site via HTTS the grant is permanent, if you use HTTP, you are asked each time.
Probably it is a security measure to prevent users who spoof the URL of a website you have previously authorized to use the camera.
But it sucks.
Answer:
Click the Chrome menu on the browser toolbar.
Select Settings.
Click Show advanced settings.
In the Privacy section, click Content settings.
Under Media, Click Manage exceptions to remove previously-granted permissions for specific sites.
Answer: Simple, when you click Allow, it will add it to a safe list of sites. In order to save the to the safe list, you must be logged into your google account.
I thought I was logged in, but I actually wasnt logged into the browser. Log into the browser and click allow and it will save Google in the safe list for the future.
Answer: This is not certain, google is using a lock for some distros, and you cant enable the search engine with the mic with google voice, the browser will take this like a non authorized action.
Comment: Hello and welcome to superuser.com. Your answer is difficult to understand. Could you rewrite it using complete and elaborating sentences? It would improve your answer greatly.


What do you call part of a conference or summit for free time

Question: WHat are some elegant ways to describe the ending of a summit or conference where participants can engage the time however they wish. They can go elsewhere, network, leave... etc. but in the program a way of describing that without just saying "Free time" or "Networking"
Comment: What don't you like about "Free time" or "Networking"? What sort of thing do you consider "elegant"?
Comment: Usually, **they attend a reception or receptions**.
Comment: Can you be more precise about what is on offer? Are you providing a space for them to meet and gather informally, maybe refreshments, or is it just a case of "conference over, get out of the building now"? It's not unusual to suggest some way of spending time whether it's "free time", "networking", "lunch", "sightseeing", "reception", "getting-to-know-you", "informal meetings", "private study", "view stalls", "exhibition", "coffee", "evening drinks", etc.
Answer: My suggestion is

After the [event] there will be XX hours available for discussion before leaving.

Cambridge has

discussion
the activity in which people talk about something and tell each other their ideas or opinions

IMO this broad description is better than patronising attendees by telling them how to use the available time, as most will know what to do at these events.
Answer: I had this as a comment, but I decided it is culture that deserves to spread.
At the end of a science fiction convention there is usually an event called The Dead Dog.
This is a name lost in the mists of time. But it probably comes from slang for an empty liquor bottle. Or possibly it simply refers to the attitude of people who have not slept for 3 days or so, now released from the requirements of running the con, and so they wind up on some vaguely horizontal surface, looking like a dead dog.
It can be held in the official hospitality suite of the convention. Or it can be in some designated location such as the hotel pool. It can be in the official programming, or it can be exclusive, invite only.
There are usually no requirements or specific goals to be achieved. There is no requirement to arrive at any time, nor to stay for any specific time. It is up to the convention and their arrangement with the venue how late it stays open, and when the hotel starts to sweep you up with the other party debris.
If it is in convention-rented space you ordinarily only need to show your convention badge to get in. If there are hospitality supplies left, these are usually given out at the Dead Dog. So snacks or beverages or things that publishers have brought as give-aways.
The invited guests of the convention usually hang out at the Dead Dog at least for some time. So you often get to hang around very informally with your favorite science fiction author, TV show star, movie producer, cover artist, etc.
So, I suggest "The Dead Dog" for the time after a conference when the venue is available, but no formal programming is being put on.
Answer: (On the) sidelines

Observing rather than taking part, out of the action, as in Bolivia's neighbors remained on the sidelines, waiting to see which faction in the dispute would prevail. This idiom comes from sports. The sidelines are the two lines defining the sides of the court or playing field and the area immediately beyond them where, in such sports as football, the non-playing team members sit. [First half of 1900s]

on the sidelines
Here's an npr headline dating September 15,2022:
Xi-Putin meeting will happen on the sidelines of a security forum in Uzbekistan


Blender how to have different pictures for hdri light and background of a scene?

Question: i have a question about the background in a blender scene. i have a scene with a house and with an HDRI in the scene world that serves as a light. so far so good. but now the hdri doesn't look good as a background/sky and i want to use a different image for it. How can I achieve this?
Answer: Use the Is Camera Ray output of an Input > Light Path node as a factor in a mix between your 2 HDRI images:


"far too early" : is it "allzu früh" or "viel zu früh"?

Question: I have seen two different constructions to express "far too early" :
"allzu früh" and "viel zu früh"?
Are they interchangeable or is the meaning/usage different?
Answer: There's a difference in meaning.
"viel zu früh" is just a stronger version of "zu früh" (too early). There is a clear threshold defining what level of "early" is still acceptable. "viel zu früh" is far beyond that.

Im 7 ist zu früh.Um 5 ist viel zu früh.

"Allzu früh" usually doesn't imply such a threshold, and it is not necessarily expressing that something is too early. Or at least that's not the focus. It just expresses that it's very, very early (which might also mean that it's too early). I think "overly early"  is a good fit, though the common translation is "too early" (according to Linguee.com)
 Here some example I found on the web:

Bumerang Babys. Neugeborene nicht allzu früh entlassen.
In Barcelona hingegen wollte ich nur nicht allzu früh ausscheiden.
  (Kontext: some fencing tournament)
Man will ja den Abend nicht allzu früh beenden müssen.
Hoffe muss morgen nicht allzu früh aufstehen ;) (from Facebook)

You cannot use "viel zu" in any of those examples without changing the tone because you'd be shifting focus to the distinction between early/too early.
Comment: In all these examples you can replace "allzu" with "sehr" or "extrem". So, it's kind of synonymous to those words.
Answer: The standard expression is viel zu früh. Allzu is not technically wrong, but definitely outdated / poetic. Also, it only really works in general expressions:

Allzu früh verschied der Dichter ... the poet died far too early

In a normal sentence it would sound incredibly stilted:

Wir kamen viel zu früh (not: allzu früh) zur Party.
Comment: There's a difference between "viel" and "allzu" (see the other answer). Furthermore, "allzu" is not outdated or poetic. Quite the contrary, in fact.
Comment: I am not convinced. Allzu simply means _übertrieben_ or _übermäßig_. If there is a difference in this example, it's a small one. As a German native speaker I have yet to find an opportunity to use it in everyday colloquial speech. This pretty much fits my definition of "outdated or poetic". YMMV.


How can I debug my keyboard layout?

Question: I'm using Plasma 5 on Arch Linux, and I type with the Colemak keyboard layout. This layout should be able to enter an em-dash with AltGr+Shift+- (hyphen). At least, that's what it did on GNOME, and that's what it's supposed to do according to the KDE keyboard layout preview for this layout. But instead it's a dead key that puts a dot under the next letter. How can I fix it?
Answer: the Colemak layout is defined in the file /usr/share/X11/xkb/symbols/us
Looking at the most recent version available to me, AltGr+Shift+Hyphen (that would be the AE11 key right of the AE10 (the zero key) and left of the AE12 key (the equal key) it says emdash in the 4th column, so your assumptions are correct.
Perhaps you didn't load the correct layout. What does setxkbmap -query say? (especially under layout and variant)?
Comment: It says "layout:     us" and "variant:    colemak." Options are "terminate:ctrl_alt_bksp,caps:escape,grp:ctrls_toggle." I checked in /usr/share/X1/xkb/symbols/us under the Colemak section, and it looks fine. I don't know what could be going on.

How can I debug my keyboard layout?


SonarQube: How many hours in a day of technical debt?

Question: If SonarQube says I have 1 day of technical debt in a project, does that translate to 24 hours of technical debt or 8 hours of technical debt?
Answer: The translation from hours into days is customisable. By default it's 8 hours, but you can find out your setting by going to Administration > Configuration > Technical Debt.
Screenshot of an example, from my project, below:
Comment: I'm working in a big company and I will not be able to contact the person who set up SonarQube, is there a way to check this if you are not an admin? Can I fetch that value with the API maybe?
Comment: Unfortunately I haven't found an obvious way of doing this. :( It might be possible to use the key 'sonar.technicalDebt.hoursInDay', but I haven't seen an API that allows it.


blender 3.1 stabilize stroke hotkey?

Question: In version 2.8 it seemed to me that the "stabilize stroke" could be accessed with a hotkey but I'm not sure, in this version 3.1 can a hotkey be configured for "Stabilize Stroke"?, I tried right clicking as before but in the The context menu that opens no longer shows the option "Add Schortcut", is there any other way?
Answer: I spent some time searching the Preferences but i couldn't find anything related to the Stabilize Stroke property. As a matter of fact, i couldn't find anything related to Texture Painting. But i found the shortcut by accident which is Shift+S to toggle the Stabilize Stroke property while in Texture Paint mode. Please also note that there is a known issue of this shortcut in this bug report
Answer: In version 3.1, this tool_settings.image_paint.brush.use_smooth_stroke already exists but when I use Shift+S, brush tool Smooth is selected.
I solved it by changing in 3dView/Sculpt/Sculpt(Global)/Brush Select, from Shift+S to Ctrl+Shift+S, and now Shift+S to activate Stabilize Stroke worked. (in Sculpt mode).
Comment: yes thats exactly the issue i mentioned in the bug report https://developer.blender.org/T88115 and changing the shortcut is the only way.
Answer: Open menu Edit ⇾ Preferences ⇾ KeyMap
Then find keymap 3D View ⇾ Image Paint ⇾ Image Paint (Global)
Find the row item Context Toggle with Shift S shortcut. You can change it here:

If you don't have a context toggle with use_smooth_stroke, you can add a shortcut by clicking the Add New button. Then expand the newly created row item and replace the keyword none with wm.context_toggle and input tool_settings.image_paint.brush.use_smooth_stroke in Context attributes.
Comment: @HarryMcKenzie `Context toggle` is an operator, `use_smooth_stroke` is a property. You can't run property but operator to manipulate property.
Comment: Oh that's why i didn't find anything coz they used another term "Context Toggle"

blender 3.1 stabilize stroke hotkey?


geo-referencing image geo-tagging,

Question: I have images from UAV which are geo-tagged. I wish to geo-reference images which were shot in sequence, and want to create a mosaic, which further will be a small map.
Is there any possible way in QGIS to do so?
Comment: I did this in Arcmap but I have not tried it in QGIS.
Answer: Assuming you don't want to do this manually by georeferencing each individual image:
No it's not possible to do this with QGIS.
You need specialized photogrammetry software to do this. Something like Pix4D or Agisoft Photoscan (30-day free trial of the full version is available) to name a few or similar. Most of these are very expensive (for individual/hobbyist use) especially if the output needs to be georeferenced orthophoto.
ESRI recently begun offering their own Drone2Map tool which just came out of Beta a few months ago. It uses the Pix4D engine and is really a dumbed down version of Pix4D with a different skin but nicely integrated in the ESRI ecosystem. Unfortunately at ~ $4,000 USD / year it's basically the same price as a full version of Pix4D (Pix4Dmapper Pro) so I am not sure who and why would even consider this particular option.
There are some free open source options such as the VisualSFM, CMVS route but you will need patience, taught skin and a NVIDEA card for the CMVS bit and there is no georeferencing option for exporting an orthophoto. It also hasn't been updated and is brutally slow. Way, way slower than the modern paid options.
The best open source free option and the only one i know of that can output georeferenced orthophotos is the Open Drone Map toolkit. This only runs on linux and is command line only but it works well. It's not as polished and feature rich as the heavy hitters' software. The orthophoto mosaic output is not corrected for exposure (the paid tools do this automatically) which means that if one image is underexposed (darker) and the neighbouring image overexposed (lighter) the transition from one to the other in the resulting orthophoto is not gradual. Orthorectification itself is also a bit harsh not as gradual and seamless as in the paid packages. Most of all, at least in our tests, georeferencing was off by ~ 10 - 15 m. Perhaps some of these can be controlled with some tweaking of parameters which we did not try. We went with all defaults in our tests. And of course you need to run this on Linux which may require

geo-referencing image geo-tagging,


How to interface Touch module with ESP 01

Question: I am trying to interface a touch module with the ESP WiFi module on GPIO0 pin. When I turn ON ESP it needs GPIO0 to be pulled up but if I directly connect the Touch module, its output is low at start up and hence ESP goes into boot mode. To circumvent this I put a simple transistor inverter in between so that I invert the touch module output. That way GPIO0 is always high during start up.
Now this solution works fine except in practical place where this needs installation. When I installed it within the housing of mains switch board, the touch module gets triggered when I switch ON other switches in the same housing. The relay turning ON or OFF also triggers the touch input. I think this is because the base of the transistor is very sensitive in this configuration and hence captures any stray signal. The whole set up works fine if the circuit is away from the mains switch board. I have even removed the connection to the touch module, it still gets triggered which indicates that it is happening because of the transistor.
Can somebody suggest to me how can I modify this circuit to avoid this false triggering.
Comment: This is a good question. Please restructure it. You can use double space to start a new paragraph.
Comment: Add a 100k pull down resistor between base and gnd.
Comment: Thanks for the suggestion @Umar . I tried this but it did not help, I still have the same issue.
Answer: 223 touch has an option to set between active high or active low mode so you can skip transistor.
Answer: The TTP223 chip has an input voltage of 3.3V - 5.5V DC.
Just remove Q1, R4 and R5. Supply TTP223 with 3,3 volt and there you are.


what does "hessian is singular mean" in SAS proc nlin

Question: Im trying to fit a power addictive nonlinear model, and keep getting a message in the results that convergence criterion met but hessian is singular. What does this mean? also in the correlation matrix I have no values for 1 or more coefficients. My guess is that it means I converged to a local minimum, but I'm not sure.
Comment: Article: "What to do when your Hessian is not invertible" ;) http://gking.harvard.edu/files/help.pdf
Answer: The Hessian is the matrix of second derivatives of the objective function you are attempting to minimize (resp. maximize, depending on how SAS set this up). The Hessian is a square $k \times k$ matrix, where $k$ is the number of parameters in your model. In your case, the Hessian is singular, which means that your parameters are linear functions of each other (or almost collinear) ... either absolutely, or with respect to the data that you have.
A young colleague of mine once got the exact error you did in SAS. Turns out he had included an intercept term twice. So the first thing you want to do is to check the specification of the model in SAS.
Another source of difficulty will occur if one of the parameters is basically useless at the data points you have. With a large sample and a good model, the log likelihood should look like a paraboloid near the minimum. However, a useless parameter can produce a long, narrow valley. Any solution in the trough of the valley will produce much the same minimum in the objective function. Your algorithm will terminate normally (it will no longer be able to improve itself by taking additional steps), but the Hessian will be singular.
If you don't have loads of parameters, (and you shouldn't with a non-linear model) you could try plotting the likelihood in the vicinity of the "solution" that SAS came up with, to see where the problem lies.
The Hessian is used to estimate the standard errors of the maximum likelihood estimates, so if the Hessian is broken, you won't get complete entries in the correlation matrix. These are obtained from the inverse of the Hessian, which you can't have, since the Hessian is singular.
I'm not sure that you converged to a minimum. With a singular Hessian, you could have converged to a saddlepoint in the parameter space, or the optimizer may simply have become disorientated and quit in the naïve belief that it had accomplished its mission. Something about your model is not working: either the way you specified it to SAS, or the data you have, or the model you are attempting to fit. Trust nothing in the results you got and start over. Perhaps try a simpler, linear model and then add more complicated features to improve the fit.
Comment: Thanks for the detailed reply! The last part of your last paragraph answers my follow up question, which was "if one of the paramter estimate has all missing values, should I focus on that parameter or revise the entire model?"
Comment: If it's just one variable with missing values, I would remove it and fit the remainder. That one change might fix it. My suggestion in the last paragraph assumed that you did not know where the trouble was, so start small and move up.
Comment: Fixed it!! One last question, is there an easy way to tell if I have converged to a local min? After finding my error, I tried a few different transformations and one of them converged after 1 iteration, which makes me think something is not right even though I have no error messages and "singular hessian" is now eliminated!
Comment: The eigenvalues of the Hessian must all be negative. This, in turn, implies that the variances of the parameter estimates will be positive. SAS should issue a warning if this is not the case.  At least, this is true when the solution is at an interior point of the parameter space. If you have constraints on a parameter (like it has to be between 0 and 1, or greater than 0), then you need to test the Karush Kuhn Tucker conditions. SAS might offer those as an option.
Comment: Regarding constraints, these are only an issue if the solution hits the boundary of a constraint.


removed mined transactions consequences

Question: I'm building a game on ethereum and one thing that really makes my life hard is understanding the removed mined transaction flow.
what happens to other transactions that counted on that transaction, for example, let's say some 1 sent me 1 ether, and then I use this ether to send it to someone else. after 5 confirmations the first transaction got removed, what happened to the 2nd transaction that used that ether?
Comment: What do you mean by "remove transaction" ? I don't think you can remove a confirmed transaction, after it's mined and present in a block. The only situation where this can occur is when the whole block is somehow removed (I think we are talking of a split chain event in this scenario, so quite a big event due to some critical circumstances like a network attack)
Comment: @Stormsson I read that it is safer to wait for 12 confirmations to make sure the transaction doesn't get removed. I also see in web3 that you can get removed in the events subscription
Comment: 12 seems a bit much to me; for my knowledge it is usually 6 for the most "secure" applications.
Answer: A transaction cannot be removed from the blockchain: once it is saved in a block it is there forever(*).
A transaction could be rejected, should this happen it will not be present in a block.
(*) A whole block could be rejected AFTER the first confirmations , but this is a sort of catastrophic event that means a lot of bad things happened; ALL the following blocks are considered invalid
The more confirmations a block has, the lower the probability is that it is "unconfirmed" (each node from the network validates the block, so if a part of the network says that the block is valid and a part doesnt... well, it's bad).
In BTC most commercial applications consider a block valid just after 1 validation, but 6 is the common number I read online to be safe (I believe this number is justified by statistical analysis, but I cannot provide a source).
edit: in ETH 12 confirmations is a common amount considered safe.
Answer: The issue you raise is the problem of finality in blockchain consensus. While highly unlikely, it is possible for a transaction to be dropped even after 5 confirmations. This would only happen if there is a temporary fork in the blockchain and the chain with your transaction gets dropped in favour of an alternate, "longer" chain. If that happens then any other transaction that relied on your first transaction will not exist because it could have never been part of the alternate chain that replaced the chain with your transaction.
Because of this risk, exchanges and services typically require 12 or more confirmations before they consider your transaction finalised (statistical finality) since at this point is extremely unlikely that the current chain will get replaced by another chain not containing your transaction.
Comment: Unfortunately there isn't a strong dependency between transactions in Ethereum. For example A sends 1 ether to B, and B forwards 1 ether to C, if the first transaction is removed the second might work if B has enough funds.
Comment: I don't think this would be possible since every transaction requires a nonce that +1 higher than your address's previous transaction. If try to you submit transaction with nonce 10, another transaction with nonce 11 and somehow your first transaction gets dropped, then your nonce 11 transaction would not be executed as nodes will be expecting your nonce 10 transaction that no longer exist.
Comment: Nonce is per account so A's nonce doesn't affect B's nonce.

removed mined transactions consequences


The battery in my Nikon D3400 dies after 50 shots. What shall I do?

Question: I just purchased my first DSLR, the D3400. It's not been more than a day and I fully charged the battery before using the camera. I took about 45-50 shots and the battery is dead again. I talked to Nikon and they said the battery is not covered in the warranty. What shall I do and what do you think are the possible causes of this?
If anyone has experienced the same please let me know how they resolved it.
Thank you
Comment: Is the camera new and under a full warranty, or just new to you?
Comment: I have a d3400 and you should be getting about 1200 hundred shots.  I keep Bluetooth on mine. They are correct to say consumables (aka batteries) are not covered under warranty. One way to test this is to get another battery. If the problem persist then you know it is the camera. If the problem stops then it was indeed a bad battery.
Comment: Is there a WiFi or Bluetooth option active? Can you try a different battery?
Comment: The camera doesn't have WiFi and Bluetooth is turned off. I only have one battery. I purchased the camera yesterday.
Comment: What lens are you using? (Exact name please :) )
Comment: I'm using the kit lens 18-55mm f/3.5-5.6G VR most of the time. Took maybe 10 shots with the 70-300mm lens.
Comment: Andreas,  currently I can't return the product as I bought it offline and also I'm leaving for hostel tomorrow. So I don't really have the time to actually go about places and get it resolved.
Comment: One thing I forgot to mention, the 50 shots were over a span of about 15 hours. Didn't use it regularly. Please let me know even now the battery should have lasted longer.
Comment: Mattdm, the camera is brand new and under full warranty.
Comment: Not dying from 50 shots sounds impressive to me :) In any case, a defect emptying a battery 20 times the intended speed tends to cause noticeable thermal havoc somewhere - there will be 19 times the intended heat created in the camera :)
Answer: This is not right. I'd try Nikon again. Explain that you understand that the battery is a consumable that might not be good in a year, but that it is brand new. If that doesn't work, take it back to the store you bought it from. And if that doesn't work, open a dispute with your credit card company (on the grounds "they sold me a lemon and won't take responsibility").
In a comment, you add:

As far as going back to the store is concerned, I'm afraid that won't be possible since I'm going out of town tomorrow and won't be back for another four months.

... well, it's not like Nikon is going to magically fix this over the phone either. From a practical photographer's point of view, this has a bit of a lesson: always make sure you either have back-up gear, or plenty of time to get things working. You should at the very least contact the store and tell them the problem. If you are planning on taking the camera on the trip, I'd consider changing my plans and squeezing in a visit to the store today.
If you do want to use the camera and don't have time for anything, I'd suggest buying a second battery. For one thing, you want to have that anyway. It'll be something like $50 for a legitimate Nikon battery (recommended) or $15 for a third-party one (probably fine). There's a reasonable chance that the problem is just with the battery, so maybe this will make it work. If not, all I have is the sad lesson to plan ahead better next time.
Comment: I have informed the store about the issue, shall visit them today or tomorrow before I leave for the airport.                                                   I'll definitely consider what you said about buying a second battery, I'll get one once I reach my hostel. Thank you so much for the help! Happy shooting!
Comment: I'll talk to Nikon about it and try to get it replaced. As far as going back to the store is concerned, I'm afraid that won't be possible since I'm going out of town tomorrow and won't be back for another four months.
Answer: The possible reasons for such behavior can be:

You preview the images you take too much. Using the LCD screen can
exhaust the battery
You use too much live view. Again using LCD is not good for battery
Your lens have image stabilization and you half press the
shutter too long.
You have defective battery
Comment: It's also possible the battery wasn't fully charged even though OP thought it was. The battery may not have been properly seated in the charger, or there could have been an electrical issue, such as a bad electrical outlet.
Comment: Another possibility, OP may have been shooting video instead of taking photos.
Comment: @xiota, yes, there is such possibility
Answer: Note that new Lithium rechargeables will typically need about 5 charge/use cycles before they show their full capacity, particularly if they have been some time on shelf.  How much use they will then endure before deteriorating again depends on their quality: second-market batteries often have a shorter lifetime in terms of recharges.  If yours is original, it should have a comparatively long one.
So for now I'd recommend to just grit your teeth, use your battery until it is empty, then recharge.  And hope that after a few times of that, the problem will sort itself out for a longer time.


Using physical wifi card inside Virtualbox

Question: I am using Virtualbox on Windows 7 and the Guest OS is an Ubuntu (live mode). I would like to access my physical (an integrated Intel Centrino Advanced-N 6200 ) wifi card in the Guest OS. I dont have possibility to use an external Wifi dongle. I read many how-to about this subject. The tutorials suggest that using an Bridged connection with my Intel Centrino card can solve my problem, but I was unable to use my real wifi card in this way. Is that possible? I miss something? If it is needed I can switch from Virtualbox to any other virtualization software.
Comment: Why not using NAT ?
Comment: @jlliagre OP would like Ubuntu guest to see the physical wifi card. We're talking PCI/PCIe passthrough here, something VirtualBox does not support on Windows hosts.
Comment: @BàlinthIstván What exactly do you want to achieve and why ? A bridged connection presents a virtualized wired interface, not the real underlying one.
Answer: I'm afraid that's not possible, not on  Windows 7 hosts.
What you're trying to do is called PCI/PCIe passthrough. VirtualBox supports it to a limited extent when running Linux on the host, but the requirements are very strict:
https://www.virtualbox.org/manual/ch09.html#pcipassthrough
As it stands, your only option is to disable on-board WiFi and use a USB 2.0 WiFi adapter instead. VirtualBox can pass that through to the guest no problem (well, there shouldn't be problem with that in theory). You mention that this is not possible for you, which means you have no solution to your problem.
Even VMware Workstation, in my opinion the only other suitable alternative VM software, does not support PCI passthrough.
Answer: If an usb dongle is not an option, then the only other solution would be to do the reverse: ubuntu on the host, windows virtualized. You could run both OS without performance penalization, using LXC or docker, while allowing direct hardware access to both linux (wifi?) or windows (GPU?)


Large File uploading to asp.net MVC

Question: I need a way to upload large files (600 mb to 4 gb) in an asp.net mvc website.
Currently I am using swfupload; it works well enough, but it is a huge hit on the webserver because it sends it in one big upload, plus I have to set it in the web.config to allow that huge of a file, which is a huge security risk. In the past when I was doing web forms development I used Neatupload which breaks up the file into chunks and uploads them individually. I am looking for a way to upload large files in mvc that uploads via chunking it up. Any ideas on how I could do this?
Answer: Silverlight File Upload
Comment: Just so anyone visiting this knows. I took this modified it some and use it now. swfupload was giving me too many problems once the files got above 1GB
Answer: I ended up using Darren Johnstone's ASP.NET File Upload Module to handle the uploading on the server side. Though I modified it slightly so that it could take a guid on the querystring that it would save the temp file to that guid name.
It was nice because it saved the file as it arrived at the server, and stripped the file out of the posted data which it then sends to the action on the controller that was specified.
Comment: The upload module contains 2 pieces, the first is a httphandler that when a file is posted (using mime encoding) it strips the file out saving directly as it goes and then letting whatever page/controller was called then be called, just with the files[] array empty.

The second part is the controls used for standard asp.net forms. I didn't use those controls at all. Instead I used the swfupload that I linked in the original question, that uses js and flash to upload a file. I then had a action call "UploadAsync" on a controller that the swfupload was configured to post to.
Comment: How did you get it to work in ASP.NET MVC without the runat=server controls? Are there punch-in points in the remaining classes? Would you mind sharing a code sample?
Answer: Example in my view:
<input id="FileGUID" name="FileGUID" type="hidden" value="f632c00b-9b66-4716-8075-79df63b780fb" />
    <input type="file" id="FileUpload1" name="fileUpload1" />

Then in the actual save action for this page I look for a file where the asyncupload action would have saved the file based on the FileGUID
Answer: A SignalR implementation example can be found here.
This also includes functionality for working with HttpContext.Request.GetBufferlessInputStream(), which allows you to begin working with the post data before it's fully uploaded.
Comment: The link you provided is dead.
Comment: I've replaced the link

Large File uploading to asp.net MVC


IPython : Running a .py file using the existing variables

Question: Is it possible to run a .py code file using the existing variables from previous executions ? I mean to run the new .py file using the variables on memory,that is,the variables I see when I enter the who command.
Comment: Please be more specific with your question. Provide some example of what you see, etc
Comment: For example, what I'm trying to do is to set a list entering 'myList = [1, 2, 3, 4, 5]' in the IDLE and run a .py file with the code 'print myList' and the command 'run mycodefile.py' so I could print an existing list in the memory with the same name.
Comment: can't you do `import mycodefile` in your code's directory. That should work
Answer: In Ipython, use run -i myscript.py. from the docs,

-i run the file in IPython's namespace instead of an empty one. This is
  useful if you are experimenting with code written in a text editor
  which depends on variables defined interactively.
Answer: As long as the .py file does not define those variables, e.g. you have a "foo" variable in dir() and the .py file specifies a change to foo, then you can use the ipython magic word %load.  To see the available documentation for all magic words type the following at the python prompt:
In [1]: %magic


Does the Principled shader alleviate the need for custom PBR setups?

Question: A couple of months ago I took Blender Guru's PBR tutorials to create the dielectric, metallic and uber shader. I find that these work really well, and I know of other PBR setups such as Remington's shader. However, with the release of the Principled shader, I was intrigued to know whether it would replace the need for all of these custom made PBR setups. Any knowledge over this would be greatly appreciated.
Comment: Imho, the new "principled shader" could work better (or not) of your custom nodes, but its setup could be perhaps easier. Of course its inner working cannot be changed, user side, apart setting its various values. Anyway, you could listen the same "guru" evaluating this new shader... https://www.blendernation.com/2017/06/25/use-blenders-new-ultimate-shader-principled-bsdf/ and then maybe try and decide yourself which one to use (and when).
Answer: Yes - and no.
For most 'real world' materials, the Principled shader should be able to produce very good results. However, it is not perfect and cannot deal with every situation - otherwise it would have far more parameters, inputs and sliders than would be practical.
The existing principled shader should be fine for pretty much all 'simple' materials - those where the visible effect is due to the material and surface properties alone - or where there is a single layer of 'clearcoat' that is within the capabilities of the 'clearcoat' parameters.
This should be sufficient for, say, 99 percent of materials (or more!). However, there are feasible situations where the principled shader is insufficient - and under those situations you would again need to combine multiple shaders. For example, a surface with multiple 'clearcoat' layers  with different properties of each layer, or a surface where the micro-detail has a significant effect on the appearance (such as the fine structure of butterfly wing scales or the irridescence of beetle wingcases).


Is it possible to read geoJSON or topoJSON file in R to draw a choropleth map?

Question: topoJSON and geoJSON files are know very common for drawing maps on the internet. Is it possible to import them in R to draw choropleth maps?
Comment: Have you tried the `rJSON` package?
Comment: @vrajs5 Please use `code markdown` only for code, not for parts of sentences like "choropleth maps".
Answer: Get the rgdal package installed. Then if:
library(rgdal)
> "GeoJSON" %in% ogrDrivers()$name
[1] TRUE

then you can do something like:
> map = readOGR("foo.json", "OGRGeoJSON")
> plot(map)

But you need GeoJSON support in your ogrDrivers list.
Comment: That's a two step process. For a brand new format, it has to be implemented in C or C++ as a "driver" for the underlying GDAL/OGR library. Secondly it has to be compiled into the GDAL/OGR library binary on your system. There is a topojson driver from GDAL 1.11 (according to wikipedia). If you dont see that then you need to upgrade some things on your machine.
Comment: Thanks. Do you know if its possible to add new formats such as topojson to the ogrDrivers list ?


TFS2018 tries to publish my Database

Question: I have setup a Build Agent for TFS2018.
For our website project I have created a Builddefinition based on ASP.NET Website template.
During the buildprocess the agent tries to publish a database,
starting with the following steps:

GetMSDeployInstalledVersionPath:   $(_DefaultMSDeployMaxVersion) is 3
  $(_MSDeployVersionsToTry) is 9.0   $(MSDeployPath) is C:\Program Files
  (x86)\IIS\Microsoft Web Deploy V3\ ProcessPublishDatabaseSettings:
  Starting Web deployment task from source: dbFullSql(******) to
  Destination: dbFullSql(******). C:\Program Files
  (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Deploy\Microsoft.Web.Publishing.MSDeploy.Common.targets(55,5): Error : Web deployment task failed. (Cannot connect to the database
  'XXXX'. Learn more at:
  http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CANNOT_CONNECT_TO_DATABASE.)

The problem is, i do not want to publish any database and I not know why the build agent tries to publish a database.
I do not know from where he has the (wrong) information about the database.
In our solution, I do not have checked any of the deploy checkboxes for the configured configuration.
In our erlier TFS2015 Version, the build with xaml Definitions did not publish a database. I have not added something about a database in my  definition. For this reason, I think, the process fin something in one of the projects about a database and think he should publish a database.
How I can remove the publishing database step?
Thank you for the suggestions.
Answer: I have the cause:
In the web project settings, you will find a package web sql pane, where the deployment of a database was configured.
To this day, I had not noticed this setting option.
I have removed and now, I can devote myself to the next deployment error :-)

TFS2018 tries to publish my Database


How are we sure a star is hot the whole way through?

Question: Just an intuitive feeling that the surface of stars is extremely hot but under the surface all types of different atmospheres could exist and so the motion of energy could move through a star like xyz rivers, leaving us with a possibility of life conditions inside the star.
Comment: Could you clarify everything from "xyz rivers" on?
Comment: Sure, by xyz rivers, i mean streams of energy that move in the most efficient 3 dimensional path, leaving pockets or 'eddies' where the energy is lower and possibly coagulated into spheres of matter. Following that train of thought, there could be a possibility that a protective atmosphere could develop to deflect or diffuse said rivers of energy enough to get conditions with a low enough temperature/pressure to support life. just a thought tho.
Answer: Our primary method of understanding stars is using optical telescopes.  We can directly measure the temperature of the "surface" of a star by fitting its spectrum to a blackbody. However, this gives us the temperature only at the "surface" or the optical depth of a visible photon.
We know that stars are extremely hot through the hydrodynamic/thermodynamic modeling. If the surface is hot, that heat must have come from somewhere.  The only place it can come from is from the star's interior.
We know that stars, like our Sun, are fusing hydrogen into helium.  This is because the mass and volume of the Sun, would give it central pressures and densities that would be hot enough to do so.
We can also directly measure the resulting particle byproducts of this nuclear fusion (a very hot process) by using neutrino detectors.
Unfortunately, life does not exist within the Sun because the temperatures are millions of Kelvins. These temperatures mean nothing more complicated than atomic nuclei and free electrons exist at the very center of the Sun.


How to deliver thank you letter and gift to the professor who wrote letter of recommendation for me

Question: I am writing a handwritten thank you letter to my professors who wrote the letter of recommendation for me, and I am also buying them a small gift because they really helped a lot throughout the application process.
I'd love to deliver the letter and gift to them in person, but that's just not the option for me now.
I am wondering will the professors receive my letter and gift if I mail them to their department in the university? or should I drop them off at the department reception?
Comment: How is it not possible to deliver the gifts in person, but it is possible to drop them at the department?
Comment: Just ask him/her for the university postal address.
Comment: Because they are out of town when I'm there, and I'm gone when they are back
Answer: Another important point to mention is that you should make sure that your gift is not too generous. Some universities have rules in place against personal gifts that exceed a certain monetary value (I think that in my university it's $100 or so). Anything more than that, and the professor will have to (a) report the gift to HR and (b) most likely won't get to keep it. These rules are in place to prevent academic misconduct, so I would really make sure that your idea of small fits university guidelines on what small means.
Answer: You can definitely mail the letter and gift to the department. In fact, if the professor isn't on vacation/sabbatical/traveling etc, the receptionists are more likely than most to know where the professor is.
In my experience, there are letterboxes for everyone, so if your letter & gift are small the receptionists will put them in the letterbox; otherwise they'll email/call the professor and tell her there's a package for her.
Answer: As Prof. Santa Claus said, just ask for their mailing address, or look it up online.
As a note for other readers, I would say that, at least in the US, many professors might find a small gift a little weird, depending on your relationship. Someone who has mentored you (like it sounds like they have) would be less unusual than someone who has just taught you in a few classes.


Blender on Android

Question: Hello Community Members.
I want to install Blender on a Android OS computer , can this be done and what are the minimum system requirements.
If not can I access Blender on it's cloud with an Android device.
All help is valued so much and appreciated with my current enquiry.
Best Always
Paul
Comment: Blender doesn't run on mobile platforms, only on Windows Mac and Linux, a little research would have taught you that. See https://blender.stackexchange.com/questions/51298/blender-for-android-goes-to-gallery-instead
Answer: There was a hacky version, but the interface would be tough to navigate without mouse & keyboard.  https://www.blendernation.com/2015/02/12/using-blender-for-android/
Another method would be to open Blender on a PC with a VNC server running in the background, then remote access it through your Android device using a VNC viewer.  https://en.wikipedia.org/wiki/Virtual_Network_Computing  Might be a bit laggy though, 'cuz everything you do will be running through a router.
Comment: Yes ! Ok Thanks for that might get a Windows OS instead seems easier and better , without complications , just straight forward , Best All

Blender on Android


Make extension install after core modules

Question: I have an extension i created that modifies core attributes. I want to make sure it is installed after all magento core modules. Is there a way i can use the depends node in my app/etc/modules/*.xml file to set the extension to be installed last? or do i have to include every core module inside it?
Answer: You need to include in the <depends> node the modules that you actually modify.
I doubt you modify something in the tables of all modules.
If you modify a product or category attribute include <Mage_Catalog /> if you modify a customer attribute include <Mage_Customer /> if you modify an order column include <Mage_Sales />...you get the point.
The order you use for the depend modules is not important.


Can I do publish my paper without APC?

Question: Now a days,I have no money to pay for Article Processing charge (APC) since I have no money support foundation.I want to publish my paper without paying any amount of money in an international journal .For this, I need the names of some international, prestigious physical journals in which I can easily publish my paper without APC in open access .I will be grateful if anyone can help me in this case.
Many many thanks.
Comment: Closing this for being a [shopping question](https://academia.meta.stackexchange.com/q/3657). What you can ask about here is *how* to find such a journal, but in physics, this should really not be a major hurdle – I know of only two relevant pay-to-publish journals. Things become a bit different if you require open access, but then you should first ask yourself whether you really require this in a field where supporting preprint publication is the norm. So, if you wish to ask about the *how,* please specify what your real constraints and difficulties are.
Comment: Are all journals in your discipline open access?  In my disciplines, many journals are free to publish unless you exceed the page limit, in which case that will attract page charges.
Comment: https://scipost.org/
Comment: @Wrzlprmft There are more than two gold open access journals in physics now:  https://journals.aps.org/authors/apcs#pricing https://publishingsupport.iopscience.iop.org/2022-iop-publishing-apc-prices/
Answer: Of course you can! There are two ways:

Publish in a subscription journal. Most of the biggest journals in physics are still primarily subscription. For example, the Journal of Cosmology and Astroparticle Physics says:

Subscription publication is free of charge.

If you can't publish in a subscription journal, you can request a waiver. Example from MDPI:

For journals in fields with low levels of funding, where authors typically do not have funds available, APCs are typically waived and cross-subsidized from fields for which more APC funding is available. For authors from low- and middle-income countries, waivers or discounts may be granted on a case-by-case basis. Applications submitted before article submission are assessed by the Managing Editor based on the quality of the research article and the authors' ability to pay.

Can I do publish my paper without APC?


How to recover game data from a smashed phone?

Question: Hey guys so it happens my Dad has been having a huff lately because he smashed his phone screen and he can't remember the password to his gmail account however he has months of game data stored on the device snd he's angry because he doesn't want to start again lol any advice?
Answer: Does the device itself have a passcode? Either way, the device is probably accessible through USB. Get ADB, plug the device into a computer, and using ADB (hopefully USB debugging was enabled before your dad sent it to hell) first type adb devices to make sure your computer sees the phone. If you're successful, you'll see your phone get listed on the screen. Then type adb backup -all -f C:\Backups\Android.ab This will create an Android backup file. You'll need to get an android backup extractor in order to retrieve your data files (like this. Google is your frienemy...;) Hopefully, this will resolve your problem. Good luck!


Redirection in varnish based on cookie value

Question: We have varnish sitting in front of our site and it is imperative that we cache as much as possible.
Recently we decided to ditch GeoIP redirection for interstate content for a more traditional 'choose your location' page. This page sets a cookie for their 'default' location and the desired outcome would be to have varnish read this cookie and redirect when at '/' only.
This functionality (while a little hacky) is supposed to be supported in varnish, but we've been unsuccessful in getting it to work. Should it work? Are we doing anything we shouldn't be?
Next to having an uncached static HTML page, what are our other options here? Can we have something other than varnish sit in front of just that page?
When we deployed the change without varnish caching it, we had massive performance issues as the site is built on Drupal and had to bootstrap every load.
If it is established that Varnish should do what we want, I'll add some vcl config to this question.
EDIT It looks like the best option is going to be to get varnish to not cache '/' and handle the cookie-based redirection in Apache.
RewriteCond %{REQUEST_URI} ^/?$
RewriteCond %{HTTP_COOKIE} cookie_name=([^;]+)
RewriteRule .* http://site/%1 [R=301,L]

Seems to do what we need.
Answer: This can be perfectly achieved on Varnish, more or less:
sub vcl_recv {
  if ( req.http.cookie ~ "cookie_name") {
    error 751 "http://site" + req.url;
  }
}
sub vcl_error {
  if (obj.status == 751) {
    /* Get new URL from the response */
    set obj.http.Location = obj.response;
    /* Set HTTP 301 for permanent redirect */
    set obj.status = 301;
    return(deliver);
  }
}


How to edit ISO Images (Including Bootable ISOs)

Question: I am looking for tools for Ubuntu that can be used to EDIT ISO Images. Including ISO images that are bootable like Ubuntu and Windows ISOs. Not only edit but save the edited ISO and can still boot when burned on an USB Drive or CD/DVD.
Answer: ISO Master
I have used ISO Master to add files to ISOs before. It is suitable for what you require because it retains the state of whether or not the ISO is bootable. I have used it in the past to add other content (like music) to a live disk. Note, however, that after making changes to an ISO file, you can only "Save As", i.e. another ISO file will be created, so make sure you have enough disk space for both.
Comment: Note: it does not work for windows installation images: https://askubuntu.com/q/228690/821405
Comment: I just tried ISO master with Linux Mint installer, it removed the FAT partition with the EFI files, the disk written based on the ISO file is not bootable.
Comment: You may need to run the command after saving the ISO file in order to make it bootable again:

`sudo isohybrid output.iso`

If your system doesn't have isohybrid available, install it with:

`sudo apt install syslinux-utils`
Comment: @diegov "isohybrid: Mint-21-XFCE-32bit.iso: unexpected boot catalogue parameters"
Comment: Solution doesn't work, same problems as the comments above
Answer: The common answer to this is to unpack the iso file, modify it, and pack it again. It looks like "ISO Master", as mentioned in dv3500ea's answer, is a good front-end to do that.
If:

you don't have enough space for that
you only want to make a surgical modification instead of rewriting the whole thing
you want to modify a storage device that contains an isofs filesystem (a.k.a. iso9660) without copying the whole device, or
if you think this unpacking/repacking thing is just not hacky enough

Then this answer is for you!
In summary, we will replace an existing file in the isofs filesystem with our desired file. Our desired file must be smaller than the existing (target) file, and trailing whitespace (or garbage) must be acceptable. This actually requires only two commands, but be careful: a typo can destroy the target filesystem completely, or even overwrite the source file. Backups are your friend!
In my case, I wanted to store a script in a live boot so I don't have to retype it every time. The script is at script.py and my target (a USB stick) is at /dev/sdc. The size of the script is 202 bytes, so our first step is to find a file larger than 202 bytes, so we can overwrite it. After mounting it at /mnt, I found a suitable file at /mnt/info.txt.
We can't just overwrite info.txt on the mountpoint, it will complain that it's a read-only filesystem. We are root, though, so let's show 'em what that means! We need to figure out where info.txt is on the filesystem. Find some string that is (probably) unique to info.txt, for example This is the official distribution CD of X., and search for it on the disk:
$ sudo strings -a -t d /dev/sdc | grep 'CD of X.'
2573588480 This is the official distribution CD of X. See INSTALL for how to [...]

Alternatively, this can also be done with grep, which is a lot faster, but then you need to specify it from the beginning: $ sudo grep -oba 'This is ...' /dev/sdc.
Now that we know where it is, we just need to replace those bytes with our file:
$ sudo dd if=script.py of=/dev/sdc conv=notrunc bs=1 seek=2573588480 count=202

This line:

copies bytes from the input file (if) to the output file (of), and it does not care that the output file is actually a device, because "everything is a file".
conv=notrunc tells it not to truncate the output file, because we only want to overwrite a few bytes, not overwrite the file from a certain point onward.
bs=1 sets the block size to 1. You usually want a block size of 4k or higher, but this both avoids having to do (inline) math and lets us specify the location exact to the byte.
seek=N seeks to a certain point in the output file (note that seek=N is different from skip=N because skip skips bytes from the input file!). We set it, of course, to where the target text is.
count=N copy only this many bytes. I think this can be omitted because it will notice the end of the input file, but I left it in just to be sure.

And voila, the file is overwritten!
But wait, the target file was larger than our script, so on the USB stick, the file is now something like: "while do if run() blah; blah(); yright 2007 X Inc.". There is trailing garbage. Two ways to fix this: make our input file longer (add spaces), or add a comment symbol at the end. Note that many editors add a newline at the end, so you might want to set count= to N-1 bytes (if your file is now 203 bytes, and you notice that the last byte is a newline, set count to 202). You can check a file for newlines by using xxd script.py | tail and checking if the last byte is 0a (or, in weird cases, 0d).
The process is identical for an .iso file, just mentally replace /dev/sdc with your.iso.
Note that when you check the target in your mountpoint to see whether it worked, you might need to use strings again (this time searching for your script) since the file is probably still in read cache.
Comment: This answer is so fun, that I would like to give a hundred up-votes haha
Answer: PowerISO just released a free Linux version of their ISO editing software1. Like ISO Master, it retains the state of whether or not the ISO is bootable. However, it allows you to save directly to the original file (by deleting it first), so there is no need to have enough disk space for both files. I also find its interface to be easier and more intuitive to use than ISO Master.

1 Unlike their Windows program, the Linux version free to use, without any size limitations or the like.
Comment: It's worth mentioning this application requires fee to pay, $29.95, if you want to remove limitation of 300MB.
Comment: @Celdor No, that's only for the Windows version. The Linux version is free without any size limitation.
Comment: the linux version is no longer updated and does not work in Ubuntu Xenial.
Comment: You may need to run the command after saving the ISO file in order to make it bootable again:

`sudo isohybrid output.iso`

If your system doesn't have isohybrid available, install it with:

`sudo apt install syslinux-utils`
Answer: Try with xorriso.
Example from here:
xorriso -indev INPUT.ISO -outdev OUTPUT.ISO -add FILE_TO_ADD.EXT

Comment: Very interesting eadmaster. Thank you
Comment: not able to install xorriso . Error - while configure command was executed -error no acceptable c compiler found in path
Answer: I recently (2023-03) need to repack a Debian GNU Linux iso to add some firmware inside and I did not succeed with 'isomaster' .
I remember that 'isomaster' methode was working fine in 2014 when most ISO were booting in MBR mode.
But I'm sorry, with hybrid UEFI / MBR ISO in 2023, the old method with ISOMASTER software could not be used anymore.
That's because today's ISO are not simple ISO but they are considered and commonly named 'isohybrid' due to the hybrid state of the bootloader (UEFI / MBR)
Here is a link with a full example where I need to add files to an ISO and I did repack a Debian GNU Linux isohybrid ISO in 2023 with UEFI and MBR and after I successfully boot on it in nearly every situations (from a USB stick, from a hard drive, from a burnt DVD, from an hypervisor starting VM in MBR mode and from an hypervisor starting VM in UEFI mode) :
Repack ISO with it's original boot equipement
Hope it could help


Ubuntu 9.04 can't connect to wireless network?

Question: Recently I upgraded to Ubuntu 9.04 on my laptop. In that it detects my wireless network but won't connect, it just keeps reprompting me to enter the WEP key! Even if I give correct password it's not connecting. Is there a solution?
Comment: this irritated me so bad I installed Windows 7 RC back onto my Laptop
Comment: More information would be useful. Could you add the contents of:

$ iwconfig

And also say what type of wireless device you have. Try

$ lspci
$ lsusb

and look for wireless to see what it is.
Answer: Try clean installing Ubuntu 9.04.
There were many improvements made to the Wi-Fi infrastructure in version 9 from version 8. I had a similar problem, and the clean install enabled all the wireless networking to work.
Comment: Before formatting over, the OP might want to boot from a live CD and check whether it's working with that one.
Comment: A couple of days ago I did a clean install of 9.10 and got exactly the same problem as the OP - a list of wireless networks, which challenge me for the correct type of authentication, but then keep repeatedly asking for it again instead of connecting.
Answer: It almost sounds like you may have a config file set up to connect for you, which causes network manager/wicd and others like it not to work. I wish I could remember the name of the file you need to check, but hopefully that gives you some more info on what to search for to fix the problem.
Comment: If you are using Ubuntu/Debian, you are probably thinking of something in /etc/network - the interfaces file is the standard one.
Answer: What software do you use? Try wicd:
$ sudo apt-get install wicd
Comment: I have difficulties with ubuntu and wireless networks as well*. Can I download wicd as a .deb package ? I can't download it view apt-get, obviously.

*I asked a question about it.
Answer: Thanks for the pointer to wicd, it's indeed more to my taste. I have a similar problem as the OP, but even installing wicd doesn't solve it (for me). In fact the connection attempt appears to always time out. I'm using the Ubuntu 9.04 netbook remix.
I've also tried the alternative madwifi driver which gives exactly the same result (i.e. none).
My guess is that some driver has changed in a way that makes the WLAN card unhappy or so. The weird part is, though, that even the alternative driver doesn't change anything. Booting into Windows XP SP3 works perfectly fine and offers all the wireless connectivity that's expected.
lspci says the card is:
Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter (rev1)
Answer: You could see if there are any restricted drivers that could be enabled - these are drivers provided by the wireless card chipset manufacturer but not under a FOSS license. To look for these, go to the System Menu -> Administration -> Hardware Drivers
Answer: When I upgraded to Kubuntu 9.04 I had the same problem.
I had to uninstall the Plasma Manager for Wireless,
Install wicd
And configure wicd to manage my Wireless Network - no problems since then.
Answer: I had the same problem when I updated from Debian Squeeze to Wheezy - I use an Atheros AR5416 card that worked fine before upgrade and wouldn't connect at all after the upgrade.  It would just keep prompting me for the passphrase.  I'm using a plain-vanilla NetworkManager configuration, without any specifications for wlan0 in /etc/network/interfaces.
The fix was to add the following stanza to /etc/wpa_supplicant/wpa_supplicant.conf:
network={
    ssid="your-ssid"
    key_mgmt=WPA-PSK
    auth_alg=OPEN
    psk="your-passphrase"
    priority=1
}
I restarted the machine and it worked.
Answer: Your system version is VERY old.....I'd suggest upgrading to AT LEAST 12.04.x LTS so that you get the newer driver set and improvements.  The Ubuntu at your level might not have the appropriate drivers, and of course lacking the later security modifications to make your system safer.


if i turn off cold water valve at hot water heater will the pressure in hot water line be empty?

Question: I wanna work on hot water line, have gas water heater, if i turn off cold water at water heater will it be ok to work on hot water line/pipes? will the pressure be released? i already turned on hot water faucet and no pressure, just wanna make sure.
Answer: Short answer: Yes
It depends on where the water heater is, relative to the pipes you want to work on. With a typical water heater in the basement, there will be very little pressure. If the water heater is on one level and you want to work on pipes a floor below then you may have to drain the entire tank. In any case, open up a couple of hot faucets and let them run until dry and you're all set.
Keep in mind that if you have mixing valves then you might have a problem of cold crossing to the hot side. If so, you may need to turn off the main supply instead of just the hot water, even though you're only working on the hot pipes.
Comment: I have to add if someone turns on another faucet both hot and cold, the water pressure is enough to push water out of the open line.
I had a small flood when a home owner forgot I told her not to use the hot water  but she could use the cold. I was at my truck threading pipe (galvanized system) and she started to fill a stock pot 3 gallons? There was probably 15 gallons of water on the floor by the time I came back in.
Comment: Probably obvious, but just saying: If the tank needs to be drained, be sure to shut off the gas supply first.
Comment: Yeah, single-handle faucets are a definite **no** under these circumstances.


Top & httpd - demystifying what is actually running

Question: I often use the "top" command to see what is taking up resources. Mostly it comes up with a long list of Apache httpd processes, which is not very useful. Is there any way to see a similar list, but such that I could see which PHP scripts etc. those httpd processes are actually running?
Answer: If you're concerned about long running processes (i.e. requests that take more than a second or two to execute), you'll be able to get an idea of them using Apache's mod_status.  See the documentation, and an example of the output (from www.apache.org).  This isn't unique to PHP, but applies to anything running inside an apache process.
Note that the www.apache.org status output is publicly available presumably for demonstration purposes -- you'd want to restrict access to yours so that not everyone can see it.
Comment: Note to self: sudo pargs -e -a PID  is useful sometimes to know more about a running process.
Comment: pstack also seems very very useful to see what a program is doing
Answer: There's a top-like ncurses-based utility called apachetop which provides realtime log analysis for Apache. Unfortunately, the project has been abandoned and the code suffers from some bugs, however it's actually very much usable. Just don't run it as root, run it as any user with access to the web server log files and you should be fine.
Answer: The php scripts happen so fast, top wouldn't show you very much. Or it would zip by quite quickly. Most webrequests are quite quick.
I think your best bet would be to have some type of real time log processor, that kept an eye on your access logs and updates stats for you of average run time, memory usage and stuff like that.
Answer: You could make your PHP pages time themselves and write their path and execution time to file or database. Note that would slow everything down while you were monitoring, but it would serve as a good measuring method.
It wouldn't be that interactive though. You'd be able to get daily or weekly results from it, but it'd be hard to see something meaningful within minutes or hours.


What of few/a few/little/a little can be a noun?

Question: I try to get known what of few/a few/little/a little we can use as noun. I would be grateful if you leave examples.
Answer: They can all be used as nouns. Consider the following examples:

Most people left before the storm hit. The few who remained did so because they had no means of transportation.
Most people left before the storm hit but there were a few who stayed behind because they had no means of transportation
There is lots of work get done but little time in which to do it.
There is lots of work to be done but only a little time in which to do it.
Comment: Thank you so much!
Comment: Both your examples of "few" are determiners modifying the pronoun "who". Both your examples of "little" are adjectives modifying the noun "time".
Comment: They are not nouns, and nor are they modifiers. "Few", "a few", "little" and "a little" are all determinatives. In your examples "the/a few" is a fused determiner-head NP, but "a few" is still a determinative, not a noun. In "(a) little", again this is a fused determiner-head NP, where "(a) little" is a determinative, not a noun
Answer: "Few" is never a noun. It can be a pronoun (something that replaces a noun), or a determiner. From Wiktionary:

few
Determiner
few (comparative fewer or less, superlative fewest or least)

(preceded by another determiner) An indefinite, but usually small, number of.
I was expecting lots of people at the party, but very few (=almost none) turned up.   Quite a few of them (=many of them) were pleasantly surprised.   I don't know how many drinks I've had, but I've had a few. [This usage is likely ironic.]
(used alone) Not many; a small (in comparison with another number stated or implied) but somewhat indefinite number of.
There are few people who understand quantum theory.

Pronoun
few

Few people, few things.
  Many are called, but few are chosen.

"Little" is similar. See little at Wikipedia. They do have a definition of "little" as a noun, but it makes no sense to me and I believe it is a mistake:

Can I try a little of that sauce? (makes sense)
* Can I try two littles of that sauce? (makes no sense)

As well as being a pronoun and a determiner, "little" can be an adjective and an adverb. Wiktionary and most other dictionaries have examples for most of their entries.
See also Oxford Learner's Dictionaries:

little (determiner, pronoun)
little (adjective)
little (adverb)


Merging in eCognition

Question: I know how to merge two polygons in ArcGis, I have tried to merge two unclassified polygons as one in eCognition for a while now and nothing is working. still remains two separate polygons. Can someone help with a video?
Comment: The Process Tree method will merge the entire segmentation to one object.We cannot choose the polgons we want like it is in the free hand method.
Is there a solution for this ?
Comment: Yes... Filtering by condition. But I'll flag this post because isn't an answer
Answer: You have two fast options:
Process tree method:
Add a child with Basic Object Reshaping: merge region use condition Class-related features / Relations to neighbor objects / Existence of / unclassified (0) = 1 and select parameter Candidates classes = unclassified
Free-hand method:

Add Manual Editing toolbar (right-click in superior panel).
Click on "Polygon selection".
Select a region (in your case, two polygons) .
Click on "Merge selected objects".
View results.

Merging in eCognition


What is the most appropriate test to determine relationship for these 2 variables?

Question: I want to look at the relationship between 1 response (1-5 likert scale) and a dichotomous outcome variable (here/not here).  What is the best way to do that?
Answer: You may use the Kruskal-Wallis Rank Sum Test.
SO that you can check whether the dichotomous outcome variable is associate with the response.
As the Kruskal-Wallis Rank Sum Test does not assume normal distribution, it fit the likert scale quite well.
Nonetheless, if you strongly believe the scale is evenly spaced and normally distributed, a simple t-test can be used.
Answer: research logit and probit.  They fall into the category of "limited dependent" approaches, and are often used when you have an independent variable and want to develop a statistically based model that gives you a yes/no outcome


Is $L = \{ a^ib^j : 0 < j < i < 2j\}$ context free? How can it be shown?

Question: Is $L = \{ a^ib^j : 0 < j < i < 2j\}$ context free?
If so, can there be a pushdown automaton described for it?
If not, does the pumping lemma apply?
Comment: Your language is context-free. Someone already asked this question on this site, and got a full answer (including a grammar).
Comment: Here is [my answer](https://cs.stackexchange.com/a/23177/683) to a remarkably similar question.
Comment: https://cs.stackexchange.com/q/10928/755
Answer: To show a language is context free we can create a context free grammar for it then show that it generates all strings in the language.
Consider the following grammar $G$.
S -> aaaRbb
R -> aRb | aaRb | eps

We must prove that $L(G) = L$.
Proof:
The variable $S$ in the grammar starts off with the smallest string in $L$. This string is $aaabb$ with $j=2$ and $i=3$ (since $0 < j = 2 < i = 3 < 2j = 4$).
The repetition happens within the variable $R$. Consider the string $s = a^ib^j \in L$. We want to see whether the string $s' = a^{i+1}b^{j+1}$ is in $L$. The first three conditions are trivial ($0 < j+1 < i+1$). The last condition is quick to check:
\begin{align}
i+1 &< 2(j+1) \\
i+1 &< 2j+2 \\
i &< 2j+1 \\
\end{align}
So $s' \in L$.
We can show $s' = a^{i+2}b^{j+1} \in L$ similarly.
The rules R -> aaaRb, R -> aR, and R -> Rb cannot be in our grammar as it can generate strings that are not in the language. As an example, the strings aaaaaabb, aaaabb, and aaabbb can be generated if we add the above rules which are not in $L$.
Thus, $G$ is complete. Hence, $L(G) = L$.
As for creating a pushdown automata, there are many guides on how to construct a PDA from CFG. The following links will be useful (just from a quick google search).

Convert CFG to CNF
Convert CFG to GNF
Construct PDA from CFG
Answer: What's the smallest possible j, and which i goes with it (to allow j < i < 2j). So that's the minimum number of a's and b'. Beyond that, you need one or two a's for every additional b.
That should be enough to find a grammar.


How To - Store Key Value Pair in Two Dimensional Array and HashTable using JQuery?

Question: Can someone please redirect me to the right link or give an example of how to work with two dimensional array or HashTable in JQuery? I tried google but did not get the answer. I want to avoid using any plugins. All i want to do it, store some information and retrieve them like HashTable way.
Comment: Is your two dim. array like a table or more like a matrix?
Comment: It is kind of a hashtable which contains key value pair. Since there is no HashTable thing in Jquery, i was thinking two dim array will be better solution. I came across jhashtable (http://www.timdown.co.uk/jshashtable/) just now. Wondering if it is OK to use it in the project.
Answer: Depending on what you want to use as keys into your "hashtable", you might want to use an object with array properties instead of a two dimensional array.
For instance:
var hashtable = {};
hashtable['screaming'] = ["red","orange"];
hashtable['mellow'] = ["skyblue","yellow","green"];

you can also set and access values in an object using dot notation:
hashtable.screaming = ["red","orange"];
alert(hashtable.screaming[0]);

If you're just looking to keep track of key/value pairs then an object is the way to go:
var hashtable = {};
hashtable['key1'] = 'value1';
hashtable['key2'] = 'value2';
hashtable.key3 = 'value3';

Comment: Exactly what I was just going to type :)
Comment: and Exactly what i was looking for. Appreciate your answer a lot.
Answer: two dimensional array is javascript. That's why you are not getting results on google.
it's something like this.
var arr = [];
arr[0] = [1,12,3,5];
arr[0][0]; // returns 1
arr[0][1]; // returns 12
arr[0][2]; // returns 3
arr[0][3]; // returns 5

or
var outerA = new Array();
outerA[0] = new Array();
outerA[1] = new Array();
outerA[2] = new Array();

Comment: I wasnt sure on what is the best to use for my requirement but your answer matches exactly what the question was asked for. Thanks for the answer. But do you mind if i accept Mario Menger's answer as it explains what i was exactly looking for.
Comment: yeah!... no worries at all ;) you could just update your question above to fit for the answer you wanted. So that others will not be confused.
Answer: Although a very late answer , you can use jhashtable js library which almost mimics hashMap datastructure in java/c#.It even has a method toQueryString() which converts the key-value pair to querystring for http requests.
http://www.timdown.co.uk/jshashtable/index.html


Posedge in Verilog

Question: I'm just beginning with FPGAs and I have decided to go with verilog as the HDL.
I saw a line like this:
always@(posedge clk)
I wanna know when is posedge used and when is negedge used. Also, what's the difference between them?
Comment: Have you read any Verilog tutorial? This is very basic stuff...
Comment: But why always posedge?
Answer: posedge triggers the block on the positive (rising) edge of a clock signal. negedge triggers on the negative (falling) edge.
Unless you're interfacing with external logic that specifically requires negative edges, you should always use posedge. Designs that use both will generally have poor timing results, and may in some situations be impossible to synthesize at all.
Comment: Minor point - "you should always use posedge" - it might be better to say you should always use all posedge or all negedge. It doesn't really matter which you use so long as you are consistent.
Comment: @TomCarpenter That depends a bit. Some FPGAs and CPLDs may only have positive-edge FFs. In any case, other people's code (including your vendor's IP cores) will typically expect positive-edge clocks.
Comment: @PeterGreen When I said "designs that use both", I mean ones that use both edges _internally_ as a substitute for appropriate pipelining.
Comment: It depends what you mean by "poor timing", on the one hand feeding between two registers of opposite clock means you have halved your available data propagation time. On the other hand it means you can tolerate a clock that arrives "early" compared to the data. This can be useful when doing relatively low speed inter-chip communications.
Answer: In general posedge clk is used, to trigger a flop at positive edge of clock. Most of the reads and writes or state changes takes place at posedge.
negedge clk is used to similarly trigger at negative edge.This is used less frequently unless using for DDR2/3 etc. If you are writing on a posedge, reading would be useful on a negedge. That would save one full clock cycle on a read operation.
Negedge clock operation is also used in testbenches, to avoid race condition between DUT and Testbench, since both are driven at different clock edges.
A similar question you can see at What is the merit to using the negedge clock in verilog?

Posedge in Verilog


POS for .NET Known Service Objects

Question: I was wondering if anyone knew where I could find a list of LineDisplays, CashDrawers, Printers, that work well with POS for .NET.  I want to get around creating my own service objects for potential devices that I might by which are not supported.  Thanks.
Comment: I've been having a difficult time searching for some good documentation on POS devices. If you've run into some, please do share with me.  Thanks.
Answer: If you download the Epson OPOS ADK for Pos .Net, you'll find it contains a readme.txt file which specifically lists the Epson hardware they support. To download this you need to create an account at www.epsonexpert.com, login, go to application development -> opos and then scroll to the bottom of the page to find the .net downloads.
Also, Sean Limings site might help; http://www.seanliming.com/WEPOS.html
He has some information posted about vendors providing SO's.
Also, TPG (sometimes rebranded as HP) have compatible OPOS objects for cash drawers and printers, but they don't have native service objects, and their OPOS service objects don't work when you are logged onto Windows as a non-admin user.
Answer: A number of vendors, including Epson, provide native .NET service objects.  Also, keep in mind that POS for .NET supports legacy OPOS for all of the device categories listed above.

POS for .NET Known Service Objects


Are guys with long hair frowned upon in CIS/CS positions?

Question: I'm currently in college and stuck between a CIS or CS major (the answer to this question will not influence my decision, so answer honestly) but I know I definitely want to have a computer-oriented position. In a position where I'd likely get little to no customer interaction, would long hair be an issue? I have Kurt Cobain-style shoulder-length hair. I wash it at least once a day so the cleanliness part isn't a problem. I'm sure I could also work with it to make it look more professional if need be. Would this be an issue or are CIS/CS positions a little more lenient?
Comment: I'd choose the field that interests you most between CS and CIS. That is much more important.
Comment: In any particular county / culture?
Comment: Some long haired men I know tie their hair back when they want to look more formal.
Comment: No good at all. In CS you want a neck-beard.
Comment: if it's not unusual to the culture, then it's probably fine, especially for a non client facing position, but it's very much up to the employers perception of what is reasonable.
Answer: That depends entirely on the industry you will be working in. CS is not a field of it's own in that regard. You will always be working for someone who wants more of their manual labor optimized and replaced by more computers. And that someone will decide what the company as a whole looks like.
If you employer is a bank for example, you can expect to adjust to suit and tie for everyday life, while online shops in the fashion industry are probably the other extreme. Any company will have it's own dress code, you just need to find the one that fits.
Comment: Almost entirely. Country and culture also affect this. But I absolutely agre with the last sentence -- either find a position that will take you as you are, or become more flexible about details like this one which really don't matter a lot. Same as dating; if my lady said she didn't like my moustache it would go, despite my having worn it for decades... but as it happens we mutually s elected each other partly because she doesn't object to it.
Comment: had to shave mine, then she made me grow it back... go figure
Comment: This. CS has _some_ input, in that you'll certainly find companies where "the computer guys" are less formal than people in other departments, but ultimately, it comes down to location, the industry a company is in, and the company's individual culture.


Can I travel outside the US while changing my visa if my previous one is still valid?

Question: I am currently in the US transferring my visa from F1 to M1 and my status is pending. (My F1 visa is still good until July) I want to go back to Europe for the holidays. Can I travel? Or am I out of status? Could I use my F1 paperwork? Is there any paperwork I could get to not get stuck at the border on my way back?
Comment: @blackbird57 a valid visa can only be used for admission if the traveler qualifies to enter in the associated immigration status.  If the traveler has an F1 visa but no longer meets F1 criteria, the traveler won't be admitted.
Comment: @blackbird57 there are two ways to change nonimmigrant status. One of to leave the country and apply for a new visa.  The other is to remain in the country and apply to USCIS for change of status.  If you leave while the application is pending, as I understand it, you abandon the application, and will have to apply for a visa to return.  In any event, the original unexpired visa cannot be used.  The fact that the application is still pending doesn't mean one can use the original visa as a backup because nothing else is yet available.
Comment: If you have a valid visa I don't see why not
Comment: @phoog right, but the traveller doesn't quite meet M1 criteria either
Comment: @blackbird57 why not, because the change of status hasn't been approved?
Comment: @phoog OP says status is pending on the M1. I'm guessing just because they applied doesn't mean they meet the criteria
Answer: A US visa is only for entry to the US. You cannot "change your visa" inside the US. You probably applied for Change of Status to change your status from F-1 to M-1.
Status only exists while in the US. When you leave the US, you no longer have status to "change" anymore, and any pending Change of Status applications are therefore abandoned.
In any case, to enter the US, you need a visa. You can only enter on your F-1 visa if you have a valid I-20 for an academic program and are resuming study in that program. If you are no longer studying in that program, you will not be able to enter using an F-1 visa. You will need to get an M-1 visa.
(Even in the case that you can still resume study in your F-1 program, you could enter on the F-1 visa, but then you will have to again apply for Change of Status if you want to still change to the M-1 status in the US, which would be much more expensive and a hassle compared to just getting an M-1 visa.)


Safe Contract Without Nonce

Question: Is it possible to modify the Safe contracts by removing the nonce parameter and executing a transaction. I am trying to do this but i am stuck on the signature part .It's giving me signature error . I am creating signature using the script provided in the safe-smart account.and facing <code> GS026</code> which means the decoded address from signature is not the owner. If its possible can anyone tell me how can i create the right signature
Answer: This is not recommended, as nonces are used to protect your contracts against replay attacks. Removing them would mean that anyone could resubmit the same transaction again and, for example, drain your safe.
If you still choose to do so, we won't be able to support you as we prioritize standard ("official") contract implementations and we can't be accountable for the behavior of a contract where major security features are disabled.
One last thing is that if you are using non-standard contracts, any interaction with our services (API, Transaction Service and overall infrastructure) as well as using our SDK or CLI won't be possible.
So again I can not stress enough that we highly advise against doing this.
Hope it helps; Best, Louis

Safe Contract Without Nonce


Does it make sense to use a wavelet that is equal to a sine of one period?

Question: Would I get same results with STFT method (short-time Fourier transform) if I try this?
Answer: With all due caution, no in both cases (title and body question). I'll start with the second one.

Continuous wavelets use all dilations of the mother wavelet, which are not accessed with the STFT
The STFT is complex in general, and the windowed sine is not.

For the first one: I  never tried it, and do not remember having seen it in use, and one should check first whether it satisfies the admissibility condition (first thought: seems OK on 0 in Fourier, and decays at infinity, I'd expect families of synthesis wavelets). You can compute the effects in Fourier using SE.Math: Fourier transform of 1 cycle of sine wave.
However, the sine falls abruptly at its edges, without differentiability, in other words it is not smooth enough. So I would not expect a  more interesting interpretation  of the scalogram than with other continuous wavelet.
But it could be used as an exploratory tool (analysis) for some specific signals. You can think about  hybrid methods as well: try to fit (in more or less robust ways) a parametric sine model, at different scales.
Comment: Unfortunately, a single period of a sine is not " only one frequency component", since it is windowed by a box, hence has cardinal sine type ripples in the frequency domain
Comment: @John it's certainly not stupid! But it forgets that wavelets are designed to be a trade-off between frequency and spatial resolution. Sadly, due to the math, there's no free lunch: you can't have high frequency resolution and high spatial resolution at the same time; the bandwidth-time product is always limited (that's Heisenberg's uncertainty in signal terms).
Comment: As Marcus says, it's certainly not stupid, and reveals intuition. Even answers are negative, this should not prevent you from trying, and you'll learn a lot (and possibly prove us  wrong). I'd expect difficulties in the time discretization, though
Comment: I fully agree with Laurent, @John! By the way, often questions that explain what you want to achieve, describe what you've considered so far (STFT and wavelets) and how that failed, asking for advice how to solve the overall problem, are very well-received and get a lot of good answers here. So maybe go and ask a new question along the lines of "I want to achieve…"!
Comment: Thanks for your answer. Regarding the first  question : I was thinking that by doing this i would get FFT information ( good frequency information because sine has only one frequency component)  but also time information. I hope that my question is not that stupid.
Answer: No, since the STFT gives you complex values by not only correlating to sines of different periods, but also cosines.
Answer: Depends on what kind of "sense" you want.
A 1 cycle sine wavelet might give you good time resolution for locating a mostly positive to negative zero-crossing waveform slice, but almost no frequency resolution, as the nearest orthogonal sinewave is a whole octave higher.
Add more cycles and you get more frequency resolution, but less time resolution.
A longer windowed DFT provides more information, as most of the basis vectors have more than one cycle, and the complex, or sine & cosine format also adds some phase information to each slice.