Сообщения

Сообщения за апрель, 2018

Has Hulk ever refused to do this in comics

Has Hulk ever refused to do this in comics In Avengers: Infinity War, Hulk refused to come out after he was sent back to Earth. Even when his life is threatened he wont come out. We can only speculate the reasons and wait for sequel to come but has this ever happened in comics. If yes, what was the reason

What is `Roland's pitch` and `Yamaha's pitch`? and How to convert notes to them?

What is `Roland's pitch` and `Yamaha's pitch`? and How to convert notes to them? I have an assign that convert this sheet to Rolands pitch and Yamahas pitch. I have no idea about what is Rolands pitch and Yamahas pitch, neither how to do it. Please let me know. using this image. According to MIDI forum post: The short answer is that MIDI notes are simply a note index and do not really define the pitch of a note. The MIDI specification only defines Middle C as note number 60. So pitch and MIDI are not really connected, so your question requires substantial additional information, such that the problem becomes clear. Middle C, the C written below the treble clef and above the bass clef, has MIDI note 60. Conventionally, this note is referred to as C4. However, Yamaha refers to MIDI note 60 middle C as C3. Another major music equipment company, Roland, refer to this note as C4, as is conventional. Therefore, the first note in your first diagram is G4 in Rol...

youtube video list in json format

youtube video list in json format I have created a function in PHP for fetching youtube video list of my channel in JSON format but m getting blank array :-... Please help me out heres my code public function channels_list method _SERVERREQUEST_METHOD; ifmethod GET json_output400,arraystatus 400,message Bad request.; else data array; json_linkhttps:www.googleapis.comyoutubev3searchkeyMY API KEYchannelIdMY CHANNEL IDpartsnippet,idorderdatemaxResults10; json file_get_contentsthis-json_link; obj json_decodejson, true, 512, JSON_BIGINT_AS_STRING; foreachobjitems as post jsondataid issetpostidvideoId postidvideoId : ; jsondatapublished_at issetpostsnippetpublishedAt postsnippetpublishedAt : ; jsondatatitle issetpostsnippettitle postsnippettitle : ; jsondatadescription issetpostsnippetdescription postsnippetdescription : ...

'Failed to get'/apt-get install error on Ubuntu Server 17.10

'Failed to get'/apt-get install error on Ubuntu Server 17.10 Im trying to configure SSH server on Ubuntu Server 17.10 using virtualbox, however every time I enter apt-get update command, the terminal returns a list of errors that looks like this excerpt: E:Failed to fetch http:pl.archive.ubuntu.comubuntupoolmainsssh-import-idssh-import-id_5.7-0 ubuntu1_all.deb Temporary failure resolving pl.archive.ubuntu.com E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing I cannot even append the whole log, because this error wont allow me to install virtualbox guest additions required to run bidirectional clipboard. Of course I tried to update and try it with --fix-missing, but it didnt work.

How to use PhpMyAdmin to import/export from/to the server it runs on?

How to use PhpMyAdmin to import/export from/to the server it runs on? When I choose to importexport a data script with PhpMyAdmin, it offers me to uploaddownload a file with my browser fromto my PC where I access it from. But Id like to loadsave the file fromto the file system of the server where the MySQL server and PhpMyAdmin run. Is this possible Yes, you can set a directory to import files from in the phpMyAdmin config file... From the docs https:docs.phpmyadmin.netenlatestconfig.htmlweb-server-upload-save-import-directories cfgUploadDir string The name of the directory where SQL files have been uploaded by other means than phpMyAdmin for example, ftp. Those files are available under a drop-down box when you click the database or table name, then the Import tab.

Registration Form Works but shows error

Registration Form Works but shows error I made a registration form. it actually works but it shows the Failed To Register, Try Again message. Heres my code. HTML and PHP DOCTYPE html html head titleRegistertitle head body form action methodPOST h3Registerh3 Username: input typetext nameunamebr Password: input typepassword namepassbr input typesubmit namebtn form body html php if isset_POSTbtn username _POSTuname; password _POSTpass; mysql_connectlocalhost,root,; mysql_select_dblogin2; query INSERT INTO users VALUES ,username,password; mysql_queryquery; echo Registered Successfully; else echo Failed To Register, Try Again; You can check the post. if _SERVERREQUEST_METHOD POST Also add uname and pass control. php if isset_POSTuname empty_POSTuname isset_POSTpass empty_POSTpass username _POSTuname; password _POSTpass; ...

Python Selenium - How to configure a client certificate file while initializing PhantomJS driver instance

Python Selenium - How to configure a client certificate file while initializing PhantomJS driver instance I need to use a certificate .cer to connect to a website. I use PhantomJS with Python. This is the connection code: driver webdriver.PhantomJSexecutable_pathSeleniumbinphantomjs, service_args--ssl-client-certificate-filecertificate.cer, desired_capabilitiesdcap However, the HTML returned is: htmlheadheadbodybodyhtml and the URL is: about:blank But if I remove: --ssl-client-certificate-filecertificate.cer Then I get the correct URL and some HTML content forbidden message because the certificate is missing. Any idea what I can do to solve this issue UPDATE 1 Ghostdriver.log contains the following: INFO - 2018-04-27T15:18:44.680Z GhostDriver - Main - running on port 55768 INFO - 2018-04-27T15:18:44.960Z Session 46addab0-4a2e-11e8-879b-bb8782c84ba6 - page.settings - XSSAuditingEnabled:false,javascriptCanCloseWindows:true,javascriptCanOpenWindows:true,javascriptEnable...

Magento 2: Add custom tab to order details page in customer account

Magento 2: Add custom tab to order details page in customer account When a customer clicks on an order on his order history page he is then redirected to the order details page. In Magento 2 standard community edition there is just one tab that list a order summary with all ordered articles. I want to add a custom tab next to the Ordered articles tab the tab might be labled slightly different, I use another language. How can I do that Please notice, I do not want to add a tab to the customer account navigation on the left nor do I want to add a tab to the admin backend. I know that there are plenty of tutorials. This hint is just to avoid misunderstandings.

TeXnicCenter does not work with Adobe anymore

TeXnicCenter does not work with Adobe anymore I get the following error which is well known: But I cant make it work and I dont want to change the Reader I know, some people moved to Sumatra. Is there any chance to make it work in a non-random way Thank you very much for your support Useful links - I think I tried all possible combination :- Concerning Sumatra link Bug install on the fly link Reader vs. Pro link acroviewRxx-setting link My settings: Edit 1 Ulrike Fischers input: Still not working. I tried A17 and R17. Both without success. I dont update the picture above Edit 2 Ulrike Fischers input: Still not working. Edit 3 Ulrike Fischers input: Good Idea, winedt takes A17-version But the pdf is not opend after creation and it cannot be opened: After closing Winedt, it says that the file is broken...

How to pick rows with higher value only in Hive

How to pick rows with higher value only in Hive I have the following data in Hive sorted by Count column: ItemX ItemXX Count ----- ------ ----- item1 item11 8 item1 item12 2 item1 item13 1 item2 item21 10 item2 item22 1 item3 item31 9 item3 item32 7 item3 item33 5 I need to filter max Count lines only. Like this: item1 item11 8 item2 item21 10 item3 item31 9 How can I do this in Hive QL Use row_number function: select ItemX, ItemXX, Count from select ItemX, ItemXX, Count, row_number overpartition by ItemX order by Count desc rn from table_name s where rn1 In common cases without sorting you can use these queries: -- 1. SELECT a. FROM tbl a INNER JOIN SELECT ItemX, MAXCount Count FROM tbl GROUP BY ItemX b ON a.ItemX b.ItemX AND a.Count b.Count; -- 2. SELECT a. FROM tbl a LEFT OUTER JOIN tbl b ON a.ItemX b.ItemX AND a.Count b.Count WHERE b.ItemX IS NULL;

Intuition behind successive squaring.

Intuition behind successive squaring. I was looking at the successive squaring method used commonly in modular exponentiation problems and was wondering why we are able to square the remainder of successive powers of a number. For example for 7327 mod 853: 71 equiv mod 853 72 equiv 49 mod 853 49 74 equiv 492 mod 853 695 78 equiv 6952 mod 853 227 ... 7256 equiv 6282 mod 853 298 During this operation, why is that we square the remainder and how do we know that doing so will relate to the final answer Im struggling to understand the intuition behind this strategy and why this actually works. You are trying to arrive at the answer with as little computation as possible. You could have arrived to the answer by multiplying 7 mod853 to itself 327 times. But that will take forever. Now, note that any integer 327 for example can be expressed in binary. For example, 327 101000111_2. This means that 327 1 2 4 64 256. If you somehow had the values of 71, 72, 74, 764, 7256 mod 8...

Función que valide que la entrada del usuario sea 0 o 1

Función que valide que la entrada del usuario sea 0 o 1 Debo hacer un while que solo me acepte el ingreso de dos valores, por el momento tengo esto: def ValorCorrecto: valorIntroducido input whilevalorIntroducido 1 and valorIntroducido.lower 0: valorIntrocido inputIngrese solo 1 o 0: return valorIntroducido El problema que tengo es que cuando ingresa un numero distinto, me muestra que solo Ingrese solo 1 o 0, pero esta se sigue mostrando a pesar de que ingrese un valor correcto Como los string 0 o 1 son numricos, no tienes que usar el mtodo lower. Adems, es mejor usar not in lista para comprobar si est dentro de los valores deseados, ya que as no tienes que escribir tantos and. def ValorCorrecto: valorIntroducido None while valorIntroducido not in 0,1: valorIntrocido inputIngrese solo 1 o 0: return valorIntroducido

Showing that if the limit of norms converges, then the sequence converges

Showing that if the limit of norms converges, then the sequence converges Let H be a hilbert space, and C subset H a convex set. Let x_n_nin mathbbN be a sequence in C with lim_nto inftyx_n inf_xin Cx. Show x_n converges in H. So far I have: Let P_C0 x in C: x inf_x in Cx be the projection of 0 onto C. If we consider barC the closure of C, then there is a theorem that tells us since barC is closed and convex, there is exactly one y in barC with yP_barC0, i.e., y inf_xin barCx. Since the infimum of a sets closure equals the infimum of the set, we also have y inf_xin C x. Now, I need to show that since the norms converge to the norm of a unique element y, the sequence itself must converge to this element. This makes sense intuitively, but I cant make it rigorous Any hints would be appreciated. x_n-x_m2x_nx_m22x_n22x_m2. Denoting inf_xin C x by A we get limsup x_n-x_m2 leq 2A2A-liminf 4frac x_nx_m 22. Note that frac x_nx_m 2 in C so limsup x_n-x_m2 leq 2A22A2-4A20. x_n is Ca...

Is there a physics limit to data transfer rate?

Is there a physics limit to data transfer rate? Is there a physics limit to data transfer rate for a USB 3.0, the rate can be a few Gbit per second I am wondering if there is a physics law tells us there is a fundamental limit to data transfer rate, similar to how the 2nd law thermodynamics tells us perpetual motion never going to happen; and similar to how relativity tells being faster than light is impossible No, there is no fundamental limit on overall transfer rate. Any process that can transfer data at a given rate can be done twice in parallel to transfer data at twice that given rate.

Where should I start building the community for a new Stack Exchange site?

Where should I start building the community for a new Stack Exchange site? Changes have been announced to how Area 51 works in the future. Robert describes how the goal is to bring an existing and active community to Area 51 and start building their new Stack Exchange site, not to start the community building process at Area 51. I left a comment there, but I think the matter is worth more elaboration. If I cant start building the community at Area 51, where and how could I create a community that I could bring there There typically is no pre-existing community. And even if there was, its hard to start building a QA community if we first have to get somehow magically organized before we can come to Area 51 and even propose having a QA site. If nothing else, it would be useful to have some hints or suggestions to start building a community and know whether the SE network wants to be a part of that early stage. For example, I am a Finn and I would much like to see a site for Finnish la...

detect if the user switched to NO in location services

detect if the user switched to NO in location services I have a code which redirects to settings if GPS or network is not enabled.The problem is that I want to either programmatically enforce location service when the alert dialog detects that GPS is not enabled or detect the option user has selected in location services and then redirect back to the calling activity.Also I want the location to be checked every 10 seconds until the particular activity is on.please help me My GPS Checking method public void setGPSLocation GPSTracker gps new GPSTrackerFormBuilderActivity.this; check if GPS enabled ifgps.canGetLocation latitude_loc gps.getLatitude; longitude_loc gps.getLongitude; n is for new line Toast.makeTextgetApplicationContext, Your Location is - nLat: latitude nLong: longitude, Toast.LENGTH_LONG.show; else latitude_loc 0.00; longitude_loc 0.00; cant get location GPS or Network is not...

what can go wrong in context of functional programming if my object is mutable?

what can go wrong in context of functional programming if my object is mutable? I can see the benefits of mutable vs immutable objects like immutable objects take away lot of hard to troubleshoot issues in multi threaded programming due to shared and writeable state. On the contrary, mutable objects help to deal with identity of object rather than creating new copy every time and thus also improve performance and memory usage especially for larger objects. One thing I am trying to understand is what can go wrong in having mutable objects in context of functional programming. Like one of points told to me is that the result of calling functions in different order is not deterministic. I am looking for real concrete example where it is very apparent what can go wrong using mutable object in function programming. Basically if it is bad, it is bad irrespective of OO or functional programming paradigm, right I believe below my own statement itself answers this question. But still I need...

Centering a tabularx created thorugh a custom command

Centering a tabularx created thorugh a custom command I have renewed the item command inside a new environment and I have added inside this environment a tabularx so that all items are properly aligned see images below. My issue is that I am unable to center the resulting tabularx inside the column of the page. I have tried to encapsule everything in a table environment and using the centering command, but none of this give the desired result or it doesnt keep the alignment of each item. Any ideas Here is what I currently have: And this is what I would like to achieve: The code of the main document is: TeX program xelatex documentclassclass begindocument beginfactlist itemSpanishGood level itemEnglishGood level itemFrenchIntermediate level endfactlist lipsum2-10 enddocument And the .cls class is: NeedsTeXFormatLaTeX2e ProvidesClassclass newcommandmyFontSize10.0 LoadClassfontsize myFontSize ptscrartcl setcountersecnumdepth-1 RequirePackagehmargin1cm,vmarg...

How would I duplicate this plot and table in Mathematica?

How would I duplicate this plot and table in Mathematica? I have struggled trying to duplicate this graphic using ListLinePlot, but I cannot get the tick options to display the year for every data point. I suspect there is a simple way to display the table, but I dont know where to start Here is what I have: y Range2000, 2009; d 5, 4.7, 4.6, 4.4, 4.3, 4.1, 4.2, 4.2, 4.2, 4.1; m 8.2, 7, 6.5, 5.3, 5.2, 4, 4.6, 4.5, 4.2, 3.7; ListLinePlot d, PlotStyle - ColorData97, 1, ImagePadding - 50, 50, 20, 20, AspectRatio - 14, ImageSize - Large, Axes - False, BaseStyle - FontSize - 14, Ticks - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 4.0, 5.0, FrameTicks - None, All, None, None, Frame - True, True, False, False

detect key press in python?

detect key press in python? I am making a stopwatch type program in python and I would like to know how to detect if a key is pressed such as p for pause and s for stop, and I would not like it to be something like raw_input that waits for the users input before continuing execution. Anyone know how to do this in a while loop Also, I would like to make this cross-platform, but if that is not possible, then my main development target is linux Python has a keyboard module with many features. Install it, perhaps with this command: pip3 install keyboard Then use it in code like: import keyboard Using module keyboard while True:making a loop try: used try so that if user pressed other than the given key error will not be shown if keyboard.is_pressedq:if key q is pressed printYou Pressed A Key breakfinishing the loop else: pass except: break if user pressed a key other than the given key the loop will break As OP men...

How would I duplicate this plot and table in Mathematica?

How would I duplicate this plot and table in Mathematica? I have struggled trying to duplicate this graphic using ListLinePlot, but I cannot get the tick options to display the year for every data point. I suspect there is a simple way to display the table, but I dont know where to start Here is what I have: y Range2000, 2009; d 5, 4.7, 4.6, 4.4, 4.3, 4.1, 4.2, 4.2, 4.2, 4.1; m 8.2, 7, 6.5, 5.3, 5.2, 4, 4.6, 4.5, 4.2, 3.7; ListLinePlot d, PlotStyle - ColorData97, 1, ImagePadding - 50, 50, 20, 20, AspectRatio - 14, ImageSize - Large, Axes - False, BaseStyle - FontSize - 14, Ticks - 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 4.0, 5.0, FrameTicks - None, All, None, None, Frame - True, True, False, False I dont know how to paste the plot from Mathematica here :-

Bound for the Brownian motion exit time

Bound for the Brownian motion exit time Suppose T inft: B_tnotin a,b where a0b and aneq -b. I would like to show mathbbET2 leq C mathbbEB_T4. The problem also says to apply Cauchy-Schwarz inequality to mathbbETB_T2. Now I know B_t4 - 6tB_t2 3t2_t is a martingale, and it suffices to show the inequality above for Twedge t. By martingale property and Cauchy-Schwarz, we have mathbbE B_Twedge t4 3mathbbE Twedge t2 leq 6 biggmathbbE Twedge t2bigg12 bigg mathbbE B_Twedge t4bigg12 I am stuck here, and I am trying to conclude from this without getting into too explicit calculation with the B_T term since we can actually compute mathbbET2 and mathbbEB_T4, but I think it is not the point of this problem...

FillChar and StringOfChar under Delphi 10.2 for Win64 Release Target

FillChar and StringOfChar under Delphi 10.2 for Win64 Release Target I have a question about a specific programming problem in Delphi 10.2 Pascal programming language. The StringOfChar and FillChar dont work properly under Win64 Release build on CPUs released before year 2012. Expected result of FillChar is just plain sequence of just repeating 8-bit characters in a given memory buffer. Expected result of StringOfChar is the same, but the result is stored inside a string type. But, in fact, when I compile our applications that worked in Delphi prior to 10.2 by the 10.2 version of Delphi, our applications compiled for Win64 stop working properly on CPUs released before year 2012. The StringOfChar and FillChar dont work properly they return a string of different characters, although in a repeating pattern not just a sequence of the same character as they should. Here is the minimal code enough to demonstrate the issue. Please note that the length of the sequence should be at least ...

Does Regular implies $T_{3.5}$?

Does Regular implies $T_{3.5}$? Prove or disprove: If a topological space is Hausdorff and locally compact then it is T_3.5. I mnaged to prove that T is regular. But how will I prove it is T_3.5

Как вывести количество строк файлов постранично?

Как вывести количество строк файлов постранично? , 100 . , . files glob..data.; fnumber 10; foreachfiles as file name basenamefile; size roundfilesizefile1024,2; count countfilefile; summa countfilefile; counts countfiles; pages ceilcountsfnumber; page _GETpage; ifpage OR page nav_min 0; nav_max fnumber - 1; else nav_min page fnumber - fnumber; nav_max fnumber page - 1; fori nav_min; i nav_max; i echo namei; echo size; echo count; echo summa; forfpr , i 1; i pages; i echo fpri 1 i pages absi-page 2 i page b stylefont-size: 14pxib : a hrefpage.i..i.a : fpr ... fpr : ... ; . Foreach, for, . foreach , size count - . . - name id : foreachfiles as file name basenamefile; filesnamename basenamefile; ...

CKEditor placeholder text doesn't work (config.js)

CKEditor placeholder text doesn't work (config.js) Im trying to add placeholder text to my ckeditor screen like for example Type here ... . You can do this with the configuration helper plugin. Ive placed the ckeditor library in sitesalllibries. Ive pasted the plugin in sitesalllibrariesckeditorplugins. Then Ive added the following code to my config.js in ckeditor folder. CKEDITOR.editorConfig function config Define changes to default configuration here. For example: config.language fr; config.uiColor AADC6E; config.extraPluginsconfighelper; config.placeholder Type here...; ; But this doesnt work. The config.js isnt added to my page when theres a ckeditor. The code is also not in ckeditor.js which is loaded on the page, I thought that the plugin maybe added it to the file. Ive also tried to add the code to my script.js which is always loaded like this: function , Drupal, window, document, undefined Drupal.behaviors.my_custom_behavior ...

Unsure about definition of “n” and “C” values in mitosis

Unsure about definition of “n” and “C” values in mitosis I am preparing for a Biology exam and Im reviewing the n and C notation used in mitosis. My professor said that when the cell replicates its DNA in S phase of mitosis, we get twice the amount C of DNA, but we still have the same number of chromosomes. Does this mean that if the replicated chromosomes were to split apart from their centromeres, we would have a 4n cell so a cell with 4 sets of chromosomes At the same time, my intuitive response sort of says, well, theyre replicated, so theyre exactly the same, so youd technically have 2 sets, not 4 right. While Ive not heard of the C notation previously, n is common notation that indicates the ploidy of a cell. The n refers to the number of unique chromosomes within a cell. Eukaryotic cells are generally diploid, or 2n. The multiplying number - 2 in the diploid case - refers to the number of versions of each unique chromosome. For example, humans are diploids 2n. We have 23 uniq...

Multiple node network communication over I²C

Multiple node network communication over I²C I am working on a project where I want to send data from and to different Arduinos on a network. At the moment IC seems the best option for my needs since I can specify where to send the data. But using this method I have a bit of an issue I cant seem to find a solution for :. I will try to explain my problem using the following image: In the backend all the nodes are connected like in the first image above the example network. But the nodes may be connected in a different sequence by a user. See the example network. In this example network, the node with ID 1 needs to send data to ID 10 and not to any other node on the network. Node ID 12 also needs to send data to node ID 10, but no other nodes. Etc. Etc. Etc. But the node that needs to send data to the next node doesnt know the id of the node it needs to send to. So at first the nodes need to find out what nodes they are connected to and where they need to send their data. I...

Self-destributing token contract template

Self-destributing token contract template Self-destributing token contract template Hello, Are there any complete templates or resources for making a token which distributes itself when funds are sent to the contract I. e. user sends 0.01 ETH to contract, which in turn sends X tokens back to user. I would prefer blockchain based solutions but if none are available then maybe a server based solution. Vesa This is a very common feature in tokens. Heres an incomplete example you can play around with: pragma solidity 0.4.23; import https:github.comOpenZeppelinzeppelin-soliditycontractstokenERC20StandardToken.sol; contract TestToken is StandardToken uint256 public tokensPerEther 1000; constructor public totalSupply_ 10000; balancesthis totalSupply_; function payable external this.transfermsg.sender, msg.value tokensPerEther; Use this one, its a very well tested implementation of token distribution contracts, which is used as...

CTRL+ENTER on a file in Windows 7 Explorer

CTRL+ENTER on a file in Windows 7 Explorer The .py files are associated to SublimeText on my Windows 7. Thus, when hitting ENTER when the cursorselection is on a .py file in the Explorer, SublimeText opens it. I want to keep this. How to make that CTRLENTER or another short shortcut, but no contextual menu can start the .py file with C:Python27python.exe filename.py Note: if not possible with Explorer, Im open to use AutoHotKey.

Identical and different object distribution among children

Identical and different object distribution among children In how many ways can we distribute 12 identical apples and 7 distinguishable cookies among 5 children.. My answer is binom125-112 cdot 57 Is it correct Explanation: Since there is no restriction to distribute the apples, I lined up the 12 apples and split them into 5 groups using the stars method and for the second one, It is only like assigning a cookie to each child. What if it says, 7 distinguishable cookies among 5 children so that everyone gets at least one My answer is: binom75 5 52 We give the kids 5 cookies and they can be arranged in 5 ways, then we normally distribute the remaining cookies. Am I missing anything Are there any notes or something you would like to add up or advice Your solution of first question is perfectly correct. You didnt miss anything. For the second question: Let A_i be the set of all distributions in which i-th children dont get a cookie. Then A_i 47 for each i. A_icap A_j37 for e...

Unable to save files in Firefox, /tmp has become read-only after upgrade

Unable to save files in Firefox, /tmp has become read-only after upgrade I recently upgraded to 18.04, and found out that when I tried to save files in Firefox I got an error saying that the could not be saved, because the disc, folder, or file is write-protected. Write-enable the disc and try again, or try saving in a different location After doing some digging I discovered that tmp had become read-only since the upgrade. Is there anything I can do I tried the answers outlined here, but none of them worked. Output of ls -ld tmp : drwxrwxrwt 21 root root 69632 Apr 28 12:10 tmp Output of mount grep tmp: udev on dev type devtmpfs rw,nosuid,relatime,size3993816k,nr_inodes998454,mode755 tmpfs on run type tmpfs rw,nosuid,noexec,relatime,size804648k,mode755 tmpfs on devshm type tmpfs rw,nosuid,nodev tmpfs on runlock type tmpfs rw,nosuid,nodev,noexec,relatime,size5120k tmpfs on sysfscgroup type tmpfs ro,nosuid,nodev,noexec,mode755 tmpfs on runuser128 type tmpfs rw,nosuid,nodev,relatime...

Using grep or awk to print text before and after match, to a specific beginning and ending string

Using grep or awk to print text before and after match, to a specific beginning and ending string I am trying to extract entries from within a large Genbank file, with many thousands of entries. For a search string, Im using a unique gene name - that works fine. The tricky bit is that Id like to print the entire entry for that particular gene - entries begin with the word LOCUS and end with , and contain the gene name at some point between. I understand that I can use greps flags -A, -B, and -C to print n lines afterbefore a string match, but the actual entries are variable in length. How would I use grep to search for my string gene name, and then print all the lines before the match up to and including a line beginning with LOCUS, and all lines up to and including a line indicating the end of the entry, which is just Im open to all suggestions - is there a way to have the -A and -B flags match a strings LOCUS and or something to that effect Should I be using awk instead Edit: Thi...

What happens if my character is killed?

What happens if my character is killed? I was the victim of an unfortunate headshot by an enemy Hunchback. My otherwise uninjured main character was instantly killed. I was surprised that the game did not instantly stop. However, I decided to reload instead of fighting on. What happens if your main character is killed Since hes is the commander of the lance, and his back story has an impact on dialog choices, is it possible to play after death

Where does pam get credential information?

Where does pam get credential information? I am learning how to write a application program which use pam to do authentication. I checked the Linux documents and some example codes, now I have a basic understanding about the pam APIs and pam configuration in etcpam.d. But I have a question is where pam get the credential information to do authentication. E.g.: If the application send the pam request with username abc and password XXXXX. How does pam check the credential information to determine whether authenticate or not If abc is not a valid user for my application, but I want to add it as a valid user, how should I do to make pam authenticatin succeed

Odd double sided printing behaviour after switching to new printer

Odd double sided printing behaviour after switching to new printer I just got a new printer, and the old printer used to double-sided print documents the way I liked, and now Ive changed to the new printer the method is different. However, on my windows machine, it prints the same as before. The behaviour I want from printing 3 pages double sided: Sheet 1: Page 1 and 2 Sheet 2: Page 3 The behaviour I get from printing 3 pages double sided: Sheet 1: Page 1 Sheet 2: Page 2 and 3 However, when I print 4 pages it prints the same as before: Sheet 1: Page 1 and 2 Sheet 2: Page 3 and 4 I am using a Brother printer and the CUPS printing system

Ajax appended drop down submitting null value

Ajax appended drop down submitting null value I am using the following code to clear then append values to a drop down select menu. Problem is when the form is submitted the value sent for the drop down is null. script typetextjavascript document.readyfunction sel_year.changefunction var deptid this.val; .ajax url: model_search.php, type: post, data: Year:deptid, dataType: json, success:functionresponse var len response.length; sel_model.empty; for var i 0; ilen; i var id responseiID; var name responseimodel_name; sel_model.appendoption valueidnameoption; ; ; ; script Then the HTML form actionmenu.php methodPOST div classcontainer h1Auto pop...

Connection string for MariaDB using ODBC

Connection string for MariaDB using ODBC What is the connection string for using MariaDB with ODBC Im guessing its something like DRIVERMariaDB ODBC 5.1 Driver; SERVERLOCALHOST; PORT3306; DATABASEDatabaseName; UIDroot; PASSWORDpassword;OPTION3; Connection strings seems to show strings for MySQL but not MariaDB. MariaDB seems to have a lot of connection strings for Access, SQL Lite, excel, etc ... What have I missed Although this is late answer, but MariaDB have that documented here SQLWCHAR ConnStr LDriverMariaDB ODBC 2.0 Driver;Serverlocalhost;UIDodbc_user;PWDodbc_pw;DBodbc_test;Port3306;

Finding unique pairs in lottery tickets

Finding unique pairs in lottery tickets I was trying to solve one of the hackerrank practice questions. Could anyone please let me know how can I make this code much effective, in terms of time and space complexity The Super Bowl Lottery is about to commence, and there are several lottery tickets being sold, and each ticket is identified with a ticket ID. In one of the many winning scenarios in the Superbowl lottery, a winning pair of tickets is: Concatenation of the two ticket IDs in the pair, in any order, contains each digit from 0 to 9 at least once. For example, if there are 2 distinct tickets with ticket ID 12930455 and 56789, 129300455,56789 is a winning pair. NOTE: The ticket IDs can be concantenated in any order. Digits in the ticket ID can occur in any order. Your task is to find the number of winning pairs of distinct tickets, such that concatenation of their ticket IDs in any order makes for a winning scenario. Complete the function winn...

When are NS records at the apex of a DNS domain queried?

When are NS records at the apex of a DNS domain queried? Lets say, that I have a following example.com zone: TTL 120 IN SOA ns1 hostmaster 2018041509 300 150 600 60 IN NS ns1 IN NS ns2 ns1 IN A 192.168.0.159 ns2 IN A 192.168.0.160 blah IN A 192.168.0.141 As seen above, ns1.example.com and ns2.example.com are two authoritative name-servers for that zone. When are they queried by other name-servers As much as I tested, the only time when those two records were queried was when I asked for NS records from 192.168.0.159 with a DNS lookup utility, i.e dig 192.168.0.159 -t NS example.com. For the casual user, it really shouldnt matter...

Dipole antennas: Will paracord hold up well enough in the sun? Is there a better alternative?

Dipole antennas: Will paracord hold up well enough in the sun? Is there a better alternative? Tower is up and pre-stretched multi-strand 14 Ga wires are cut terminated for a multiband fan-style dipole antenna system. Location is the desert southwest of the USA. Stringing up parts of it are going to be a challenge due to topography, and it will require lengthy tie-down cord on the end of the 7580 Meter portions. Monofilament would definitely stretch and break down in the sun. So Im intending to use paracord and have a quantity of Mil Spec 7 Stranded Type III Nylon black paracord on hand. My question: 1 Will paracord hold up well enough in the hot sun And does the color matter i.e., will black paracord degrade noticeably faster than white 2 Is there a better alternative FYI, I used the same antenna wire mentioned here: HF SWL antenna wire Will plain 16-Gauge copper wire work well enough Paracord is a usurped and abused term for a wide variety of cords. The US Military pre...

Laptop turned in to IT support has a document with staff member's name. Is it ethical for the staff member to read it?

Laptop turned in to IT support has a document with staff member's name. Is it ethical for the staff member to read it? Im one of the two team members who work in IT support at my company. I recently had a laptop turned in for hard drive replacement. While copying the files to the new drive, I noticed a document named John Doe.docx, where John Doe is my full name. I returned the laptop after replacing the drive, but have yet to destroy the old drive. Would it be ethical for me to read the document having my name I understand itd generally be considered an integrity violation to read emails and other documents of others. Thats not what Im doing or is it EDIT: I accepted an answer and have wiped the disk without opening anything. As an IT support person, you are only authorized to do what is needed to resolve the users IT issues. In this case, the user wants his disk replaced without losing his data. Hence, you only need to move the data from the old disk to the new disk, and repl...