body1
stringlengths
20
4.1k
body2
stringlengths
23
4.09k
I have a custom object "Opportunity Project", and Opportunity has a lookup to the custom object. Each "Opportunity Project" could have a handful of Opportunities related to it. Need a basic trigger that grabs the total of the Opportunity Amounts and updates a currency field on the Opportunity Project record. (Cannot make Opportunity a Child under a custom object)
Is there anyway to update a rollup summary field with lookup relation ship for a custom object. How can we achieve this using triggers ?
Problem I have the below snippet in a website that I'm building at the moment. I know it is not secure due to SQL injection etc. but what is the correct way to solve that? I see related questions asking the same thing but with MySQL, and for that there is PDO, but PDO_OCI is experimental so I don't want to use it. What other options do I have? Do I just create a function to strip certain characters and wrap that around the $_POST, something like str_replace(';', '', $_POST['username']);? The below snippet is the only part of the website that actually takes user input, $_POST, in a query so I just need to make sure that I get the below correct. Code <?php if (!empty($_POST)) { $stid = oci_parse($conn, "SELECT CustomerNo FROM Customers WHERE Username = '" . $_POST['username'] . "' AND Password = '" . $_POST['password'] . "'"); oci_execute($stid); $row = oci_fetch_array($stid, OCI_NUM); if (!empty($row['0'])) { session_start(); $_SESSION['customer'] = $row['0']; $_SESSION['username'] = $_POST['username']; } oci_free_statement($stid); oci_close($conn); } ?>
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example: $unsafe_variable = $_POST['user_input']; mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')"); That's because the user can input something like value'); DROP TABLE table;--, and the query becomes: INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--') What can be done to prevent this from happening?
UPDATE: Thank you all for your answers, especially pertaining to .equals(). The only detail is that the "msgCode = ..." and "msgValue = ..." statements are enough to return an empty stirngBuilder. I.e., I don't even have to declare the IF statement to make it stop working. Any clues? ORIGINAL: Please let me know why StringBuilder returns nothing (perhaps doesn't even work) when I include the rest of the code (besides stringBuilder.append(...)) inside the while(). When I include just stringBuilder.append(...), then there is a return value. while ( (receiveString = bufferedReader.readLine()) != null ) { stringBuilder.append(receiveString + "\n"); // analyze the first 3 characters in the message String msgCode = receiveString.substring(0, 3); Number msgValue = Integer.parseInt(receiveString.substring(4, receiveString.length()-4)); // use IF-ELSE since SWITCH doesn't work with String if (msgCode=="ATT") { dataATT[2*dataATTcount+1] = msgValue; dataATTcount++; } else { dataMED[2*dataMEDcount+1] = msgValue; dataMEDcount++; } } Thanks
I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug. Is == bad? When should it and should it not be used? What's the difference?
I'm using 2014 Moto X (2nd Gen) and lately I keep getting: Android is starting... & Optimizing app whenever I start my phone( I tried to clear wipe cache partition, but that did not help towards resolution of my issue.
I recently updated to Lollipop on a Moto G (1st Gen). It was running a bit slow, so I wiped by cache then performed a factory reset as recommended. I now receive the 'Android is starting optimising app xx of xx' every time I boot. Obviously not life and death, but it's annoying to have to wait 10 minutes for every reboot. Is this a known issue and is there any way to fix this?
I just create the function (Python) and want to use the variable that was defined outside the function and an error has occurred def outside_variable_show(status): if status == 1: crrnt_nmbr = crrnt_nmbr + 1 print (crrnt_nmbr) status = 1 crrnt_nmbr = 0 print (crrnt_nmbr) outside_variable_show(1) note: "crrnt_nmbr" must use in and outside the function. please tell me the way to implementation with it. Thank you so much.
How can I create or use a global variable in a function? If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?
How can we find the orthonormal basis of $\{(x_1,\dots,x_n) \in \Bbb R^n \mid x_1+x_2+\cdots+x_n=0\}$? It is easy to find a basis, but using Gram-Schmidt procedure seems difficult to obtain an orthonormal one.
Find an orthonormal basis for the subspace of $\mathbb{R}^4$ that consists of vectors perpendicular to $u = (1, -1, -1, 1)$. I know the components of the vector $u$ is $u_1 = 1, u_2 = -1, u_3 = -1, u_4 = 1$. I managed to find a vector $v$ that is perpendicular to the $u$. This is done by $u_1v_1+ u_2v_2+ u_3v_3 + u_4v_4 = 0$. This means $v_1 = -1, v_2 = 1, v_3= 1, v_4 = -1$ because $(1)(-1) + (-1)(1) + (-1)(1) + (1)(-1) = 0$. So I found a vector $v$ perpendicular to the given vector $u$ which is $(-1, 1, 1, -1)$. So my question would I be able to call $(-1, 1, 1, -1)$ my basis and perform Gram Schmidt process on it?
I have two USB 3.0 ports in my dell inspiron 5421 laptop . The ports marked as SS meaning super speed. But when I run the command lspci -t this is the output /: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M /: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M |__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M |__ Port 4: Dev 4, If 0, Class=Wireless, Driver=btusb, 12M |__ Port 4: Dev 4, If 1, Class=Wireless, Driver=btusb, 12M |__ Port 6: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M |__ Port 6: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M and the output of lsusb is below Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 005: ID 0c45:649a Microdia Bus 001 Device 004: ID 8087:07da Intel Corp. Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub As is shown, none of the command shows the presence of a Super Speed USB port. I never actually checked it before but currently I am thinking to buy a portable 256Gb SSD, that's why I am checking if the port would be a bottleneck for the Drive. Here is the output of lsmod | grep hcd; lspci -nnk | grep "USB controller" -A2 00:1a.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 [8086:1e2d] (rev 04) Subsystem: Dell Device [1028:0591] Kernel driver in use: ehci-pci 00:1d.0 USB controller [0c03]: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 [8086:1e26] (rev 04) Subsystem: Dell Device [1028:0591] Kernel driver in use: ehci-pci
# lsmod |grep xhc nothing here but in dmesg: # dmesg |grep xhc [ 0.650446] xhci_hcd 0000:00:14.0: xHCI Host Controller [ 0.650450] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1 [ 0.651518] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x00109810 [ 0.651523] xhci_hcd 0000:00:14.0: cache line size of 64 is not supported [ 0.651580] usb usb1: Manufacturer: Linux 4.2.0-25-generic xhci-hcd [ 0.659081] xhci_hcd 0000:00:14.0: xHCI Host Controller [ 0.659083] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2 [ 0.659105] usb usb2: Manufacturer: Linux 4.2.0-25-generic xhci-hcd [ 0.969678] usb 1-5: new full-speed USB device number 2 using xhci_hcd [ 1.269906] usb 1-6: new low-speed USB device number 3 using xhci_hcd [ 1.722308] usb 1-11: new high-speed USB device number 4 using xhci_hcd [ 3487.664191] usb 1-1: new high-speed USB device number 5 using xhci_hcd [ 3555.543441] usb 1-1: reset high-speed USB device number 5 using xhci_hcd is it already working but built-in in the kernel? #locate xhci /lib/modules/4.2.0-16-generic/kernel/drivers/usb/host/xhci-plat-hcd.ko /lib/modules/4.2.0-22-generic/kernel/drivers/usb/host/xhci-plat-hcd.ko /lib/modules/4.2.0-23-generic/kernel/drivers/usb/host/xhci-plat-hcd.ko /lib/modules/4.2.0-25-generic/kernel/drivers/usb/host/xhci-plat-hcd.ko /usr/src/linux-headers-4.2.0-16/... ...
Implement quick sort algorithm with faulty results. Details of what I want to do can be found at the video: Does break command take me out of inner loop or both loops? Below you'll find the code, any help will be welcome. int main (void) { // Array of integers to be sorted int list[] = { 3, 9, 8, 5, 7, 6, 4, 2, 1}; int arrayIndexLimit = (sizeof (list) / sizeof (int)) - 1; int temp = 0; // "J" separates sorted part of array from unsorted one for (int j = 0; j < arrayIndexLimit; j++) { // Find smallest value in unsorted part of array for (int i = j; i <= arrayIndexLimit; i++) { // Put smallest value in jth position if (list[i] < list[arrayIndexLimit]) { temp = list[j]; list[j] = list[i]; list[i] = temp; break; } // Pivot (last item of array) is the smallest if (i == arrayIndexLimit) { temp = list[i]; list[i] = list[j]; list[j] = temp; break; } } // Print sorted list }
In a C# (feel free to answer for other languages) loop, what's the difference between break and continue as a means to leave the structure of the loop, and go to the next iteration? Example: foreach (DataRow row in myTable.Rows) { if (someConditionEvalsToTrue) { break; //what's the difference between this and continue ? //continue; } }
While running sudo apt-get update it gives me the following error alika@vilnisi:~$ sudo apt-get update [sudo] password for alika: Hit:1 http: //deb.playonlinux.com precise InRelease Hit:2 http: //archive.ubuntu.com/ubuntu bionic InRelease Ign:3 http: //ppa.launchpad.net/glasen/freetype2/ubuntu bionic InRelease Get:4 http:/ /archive.ubuntu.com/ubuntu bionic-updates InRelease [83,2 kB] Hit:5 https: //dl.winehq.org/wine-builds/ubuntu bionic InRelease Err:6 http: //ppa.launchpad.net/glasen/freetype2/ubuntu bionic Release 404 Not Found [IP: 91.189.95.83 80] Get:7 http: //archive.ubuntu.com/ubuntu bionic-backports InRelease [74,6 kB] Get:8 http: //archive.ubuntu.com/ubuntu bionic-security InRelease [83,2 kB] Reading package lists... Done E: The repository 'http:// ppa.launchpad.net/glasen/freetype2/ubuntu bionic Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
When updating, I get the following error message: W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file. Here, I find another statement on this error: This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need. Is this what I should do?
Was driving home today from a trip up north and decided to check my journey on Google's location history after I got back. Phone is a Nexus 5 running Android 5.0. The locations mostly correct apart from one obvious wild location - which is clearly impossible. Any ideas what could have happened?
I have a major problem that I hope someone can help with. On my Google Maps feature under my Location History it shows a location that I was never at at any point, but when my wife happened to see that location she doesn't believe me that the GPS could be wrong and pinpoint that location if I was never there. I was first wondering myself how could that could be possible if I was never there or my phone was never at that location that was 35 miles away from me and second is there any way I could prove the GPS being wrong? Can I contact Google Maps and can they give an official printout of that certain day and every location I was? I really need to prove my honesty to her and hope there is a way.
The package provides macros for transformation signs, eg: \fourier and \laplace. I need a vertical version of those symbols.
I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?
Is there a word in English that distinguishes between the mother’s brother and the father’s brother, or the mother's sister and the father's sister? The words ‘uncle’ and 'aunt' don't seem to do the job.
Please refer the following questions asked elsewhere on this site: I am a native Hindi speaker; Hindi has a plethora of terms referring to relationships. To take a trivial example, the term uncle may refer to father's elder brother, father's younger brother, mother's brothers, father's sister's husband, mother's sister's husband, all of which have specific addresses in Hindi. I discussed the same with one of my teachers. She had the opinion that the development of language mirrors the cultural moorings of the society that uses the language. Now, since all of the above relationships have distinct status and reverence in the Hindi speaking society, that calls for different addresses. That may well not be the case in English speaking societies. Is that correct? What other linguistic reasons may account for such a dearth of vocabulary in English in this area?
I am travelling to Greece soon and will be wanting to take pictures out of the plane window. When i have done this before there has been a reflection on it. How can i reduce or prevent these reflections? Thank You
I find that I take a lot of pictures through skyscraper and vehicle windows (those that are impractical or impossible to open). There are all kinds of problems with taking photographs through windows: reflections from light inside, dirt on the window, etc. My technique mostly involves placing the lens directly on the window glass and shielding it from lights reflecting from above. Are there any non-obvious gizmos / techniques for easily shooting through windows? I've heard that a polarizing filter might be used in this situation, but I don't carry one around most of the time. Besides, most of the pictures I am interested in taking are in low light situations (at sunset or in a moving train, etc).
I have this issues with my ubuntu apt-get update ubilli@ubilli-pc ~> sudo apt-get update [sudo] password for ubilli: Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease Ign http://ppa.launchpad.net precise InRelease . . . Ign http://ppa.launchpad.net precise/main Translation-en Hit http://us.archive.ubuntu.com saucy-updates/universe Translation-en Fetched 459 kB in 25s (17.7 kB/s) Reading package lists... Done W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn\'t be verified because the public key is not available: NO_PUBKEY D1106511179518B2 W: There is no public key available for the following key IDs: 3B4FE6ACC0B21F32 W: There is no public key available for the following key IDs: 3B4FE6ACC0B21F32
I get the following error when i do sudo apt-get update W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 6AF0E940624A220 I tried following ways after reading various questions here and also by googling. I tried sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220 It did not help. I also tried sudo gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys thinking port 11371(default) may be blocked due to firewall. I also tried to reset everything as follows sudo rm /var/lib/apt/lists/* -vf sudo apt-get update && sudo apt-get upgrade still i get the same error or get update. Any other possible solution I can try?
I need to fetch the data from SQL Server based on the below condition. In the database there are columns Ticketnumber and comments. For a Ticketnumber there are multiple records, for the same ticket number there are multiple comments stored in different records. Whenever I retrieve the ticketnumber and comments columns, the comments should be concatenated in the single record. Let's look at an example: Ticketnumber Comments ------------------------------- 1002 Case raised 1003 Case raised 1002 Processing, 1003 resolved 1002 resolved Expected output should be: Ticketnumber Comments ----------------------------------------------- 1002 Case raise,processing,resolved, 1003 case raised,resolved All the comments should be concatenated for single ticketnumber as above. Please provide the query. Thanks in advance
Consider a database table holding names, with three rows: Peter Paul Mary Is there an easy way to turn this into a single string of Peter, Paul, Mary?
I want to know the exact numbers and preferably the calculations that gives the size of the universe at the Big Bang and the initial rate of expansion at the moment of big bang. Does somebody know this? thanks!
Conceivably it expands with the speed of light. I do not know, but curious, if there is an answer. At what velocity, does our universe expand?
I want to generate a string mix of numbers-capital and small characters but they should be unique with a specific length Is there any algorithm or library in java to generate unique strings?
I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string. In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated). Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".
I have been using Ubuntu on my laptop for a while now but am not proficient in it. I am using Ubuntu 14.04 LTS on a Dell Inspiron Laptop, Pentium(R) Dual-Core CPU T4200 @ 2.00GHz × 2, 3GB memory. The Software Updater crashes and updating from the Terminal gives back unmet dependencies. When I try apt-get -f install I get the following: Reading package lists... Done Building dependency tree ... 0 upgraded, 2 newly installed, 0 to remove and 201 not upgraded. 5 not fully installed or removed. Need to get 0 B/10,7 MB of archives. After this operation, 87,5 MB of additional disk space will be used. Do you want to continue? [Y/n] y ... (Reading database ... 896154 files and directories currently installed.) Preparing to unpack .../linux-headers-4.4.0-112_4.4.0-112.135~14.04.1_all.deb ... Unpacking linux-headers-4.4.0-112 (4.4.0-112.135~14.04.1) ... dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-112_4.4.0-112.135~14.04.1_all.deb (--unpack): error creating directory `./usr/src/linux-headers-4.4.0-112/drivers/isdn/act2000': No space left on device No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Preparing to unpack .../linux-headers-4.4.0-112-generic_4.4.0-112.135~14.04.1_amd64.deb ... Unpacking linux-headers-4.4.0-112-generic (4.4.0-112.135~14.04.1) ... dpkg: error processing archive /var/cache/apt/archives/linux-headers-4.4.0-112-generic_4.4.0-112.135~14.04.1_amd64.deb (--unpack): error creating directory `./usr/src/linux-headers-4.4.0-112-generic/include/config/lp8788': No space left on device No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/linux-headers-4.4.0-112_4.4.0-112.135~14.04.1_all.deb /var/cache/apt/archives/linux-headers-4.4.0-112-generic_4.4.0-112.135~14.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) df -h shows the /boot partition is 84% full $ df -h Filesystem Size Used Avail Use% Mounted on udev 1,5G 4,0K 1,5G 1% /dev tmpfs 298M 1,4M 296M 1% /run /dev/sda1 41G 20G 19G 52% / none 4,0K 0 4,0K 0% /sys/fs/cgroup none 5,0M 0 5,0M 0% /run/lock none 1,5G 24M 1,5G 2% /run/shm none 100M 56K 100M 1% /run/user /dev/sda5 945M 734M 147M 84% /boot /dev/sda7 12G 8,1G 3,0G 74% /usr /dev/sda3 178G 152G 26G 86% /media/andrei/OS
My first issue was when I tried to apt-get update or apt-get upgrade. On upgrade I get the following error: You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not installed E: Unmet dependencies. Try using -f. I tried running apt-get install -f and this was the output(after saying yes on prompt) (Reading database ... 186183 files and directories currently installed.) Unpacking linux-image-3.2.0-27-generic (from .../linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb (--unpack): failed in write on buffer copy for backend dpkg-deb during `./boot/System.map-3.2.0-27-generic': No space left on device No apport report written because the error message indicates a disk full error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-27-generic /boot/vmlinuz-3.2.0-27-generic Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-27-generic_3.2.0-27.43_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I tried running apt-get autoremove and it gives me the same error as apt-get upgrade. When I run df, I get this for /boot: /dev/sda1 233191 230297 0 100% /boot So, I read elsewhere that I should try to purge old kernels. I checked for what kernels I had with: $ dpkg -l linux-image-\* | grep ^ii ii linux-image-2.6.38-13-server 2.6.38-13.52 Linux kernel image for version 2.6.38 on x86_64 ii linux-image-3.0.0-13-server 3.0.0-13.22 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-14-server 3.0.0-14.23 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-15-server 3.0.0-15.26 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-16-server 3.0.0-16.29 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.0.0-17-server 3.0.0-17.30 Linux kernel image for version 3.0.0 on x86_64 ii linux-image-3.2.0-24-generic 3.2.0-24.39 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-25-generic 3.2.0-25.40 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-26-generic 3.2.0-26.41 Linux kernel image for version 3.2.0 on 64 bit x86 SMP When I try to remove the oldest with this: $ sudo apt-get purge linux-image-2.6.38-13-server Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-image-server : Depends: linux-image-3.2.0-27-generic but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). How can I free up or extend boot without messing up my installation?
I really need to use lightningStyleSheets="true" in my component (styled otherwise it just doesn't look as nice). (standardcontroller="Lead"). Where I'm stuck is that I need to take this page and save it as a pdf to the lead record, which seems to requre using renderas="pdf". However it seems these 2 cannot be used together-- it just displays Salesforce Internal Error... on the page. I am trying to think of some sort of workaround. Is there any way to upload this page to the Lead record without using renderas="pdf"? What if I load the page in a lightning component, then load that component in a new vf page- would that work? Just trying to think of anything.. really need to make this work :) Any suggestions are appreciated
I have a VF page with lightningstylesheets = "true". (This needs to stay this way-- when I take that away the whole page doesn't look right.) I need to save this VF page as a PDF to my Lead record, from an after update trigger. I am seeing that I cannot use renderas="pdf" together with lightningstylesheets="true". I am also seeing that when I try to save the page as is as a pdf, it does not work-- the logs say Internal Salesforce.com Error. Does anyone have experience with a similar issue? How can I make this work? Here is the code I'm trying to get the body of the page as pdf: PageReference pref = Page.SEEK_MVP_PDF_Display; pref.getParameters().put('id',leadId); Blob b; if(Test.isRunningTest()) { b = blob.valueOf('Unit.Test'); } else { b = pref.getContentaspdf(); system.debug('B: ' + b); } ContentVersion cv = new ContentVersion(); cv.versionData = b; cv.title = 'SEEK Medicare Eligibility Check'; cv.PathOnClient = 'SEEK_Eligibility_Check.pdf'; insert cv; ContentVersion Content = [SELECT id, ContentDocumentId FROM ContentVersion where Id = :cv.Id]; ContentDocumentLink contentlink=new ContentDocumentLink(); contentlink.LinkedEntityId= leadId; contentlink.ShareType= 'V'; contentlink.ContentDocumentId= Content.ContentDocumentId; insert contentlink;
I have a WiFi hotspot setup using Hostapd and Dnsmasq. Everything works great, but I'm trying to trigger the sort of Terms and Conditions page you might see at a hotel or coffee shop after you connect to their captive portal. Most modern devices will automatically bring up this Terms and Conditions page immediately after connecting to one of these captive portal networks, which is what I'd like to happen after connecting to my hotspot. As I understand it this is usually detected by the device by checking to see if a specific website returns a predictable response. For instance Google seems to test a connection to http://clients1.google.com and if it gets any response other than "generate204" it should trigger the captive portal agreement page. I've found two ways to redirect all traffic (and presumably these specific domains) to a web server running on my device... One by adding the following line to /etc/dnsmasq.conf: address=/#/10.0.0.1 and the other by using iptables. This triggers from a script on boot: iptables -t nat -A PREROUTING -d 0/0 -p tcp --dport 80 -j DNAT --to-destination 10.0.0.1 Both succeed in redirecting all traffic to 10.0.0.1 (which is the correct address for the local web server) when manually entering a url into the browser, but the page doesn't open automatically upon connecting to the access point. I've also tried manually adding entries for specific google URL's like: address=/clients1.google.com/10.0.0.1 into the /etc/dnsmasq.conf with no luck. I've run out of ideas, any suggestions.
I have a WiFi hotspot setup using Hostapd and Dnsmasq. Everything works great, but I'm trying to trigger the sort of Terms and Conditions page you might see at a hotel or coffee shop after you connect to their captive portal. Most modern devices will automatically bring up this Terms and Conditions page immediately after connecting to one of these captive portal networks, which is what I'd like to happen after connecting to my hotspot. As I understand it this is usually detected by the device by checking to see if a specific website returns a predictable response. For instance Google seems to test a connection to http://clients1.google.com and if it gets any response other than "generate204" it should trigger the captive portal agreement page. I've found two ways to redirect all traffic (and presumably these specific domains) to a web server running on my device... One by adding the following line to /etc/dnsmasq.conf: address=/#/10.0.0.1 and the other by using iptables. This triggers from a script on boot: iptables -t nat -A PREROUTING -d 0/0 -p tcp --dport 80 -j DNAT --to-destination 10.0.0.1 Both succeed in redirecting all traffic to 10.0.0.1 (which is the correct address for the local web server) when manually entering a url into the browser, but the page doesn't open automatically upon connecting to the access point. I've also tried manually adding entries for specific google URL's like: address=/clients1.google.com/10.0.0.1 into the /etc/dnsmasq.conf with no luck. I've run out of ideas, any suggestions.
I can get to a grub command line by pressing the ESC key during boot. But no grub menu. I hadn’t used this computer in a while and forgot the password. Is there a way to reset the password from the grub command line rather than the grub menu? Dell XPS 13 9360 Ubuntu 18.0.4 Thanks
I need to reset my password. I have followed these steps: However, then I go to "root" or "netroot" recovery options, it tells me: Give root password for maintenance (or type Control-D to continue) Clearly, I do not know the root password. If I type CTRL+D, I return to the list of options. From I read: Under chapter 'The Other Way': 4. Highlight the line that begins kernel and press 'e' to edit` But in the grub configuration file I have no line that starts with kernel. Only: setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6.... Those are all lines in my GRUB. Which line should I edit? Or is there another way to reset my password?
I heard median of any number of data. Suppose we have a data [13,23,23,23,54] The median of this data is is 23. How we calculate the weighted median of same data (as mentioned above). ** (this is i get when i Google it. But things are not clear).
I was given some data that represents the number of lines in a document as well as the line count per hour (which is the lines in the document divided by the number of hours that the document was worked on). Considering the following data: lines LCPH 57 133 62 135 33 137 76 139 78 141 Typically, I would express the median LCPH as 137 as it is the 3rd of 5 figures. However, the median is currently being reported as 139 because it is not until the fourth document that more than half the lines in all documents were seen. This figure is currently being referred to as the Weighted Median LCPH instead of Median LCPH. Is there a different term for this sort of figure?
I have installed Ubuntu 14.04 on my laptop, and I had a problem when I want to mount a hard drive due to windows 8 hibernation. The problem is that when I was partitioning my hard drive I formated the drive which contained Windows 8 without shutting down Windows, I only did a hibernation, so now I can't resume and shutdown Windows fully. Now I can only mount my hard drive as read-only. How can I solve this problem ??
Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount. When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens. Here's my partition table, if any more data is needed please let me know. Device Boot Start End Blocks Id System /dev/sda1 2048 20000767 9999360 83 Linux /dev/sda2 20002814 478001151 228999169 5 Extended /dev/sda3 * 478001152 622532607 72265728 7 HPFS/NTFS/exFAT /dev/sda4 622532608 625141759 1304576 82 Linux swap / Solaris /dev/sda5 20002816 478001151 228999168 83 Linux
I tar a folder on windows and untar on RHEL machine. ls -l shows a . in file mode and folders are in blue + yellow background. [root@xt-storage-01 apache-tomcat-8.0.5]# ls -l total 120 drwxrwxrwx. 2 root root 4096 Jul 24 11:18 bin drwxrwxrwx. 2 root root 4096 Jul 24 11:18 conf drwxrwxrwx. 2 root root 4096 Jul 24 11:18 lib what's the meaning of . at the end of file mode?
I performed an ls -la on directory on my CentOS 6.4 server here and the permissions for a given file came out as: -rwxr-xr-x. I understand what -rwxr-xr-x means, what I don't understand is the . after the last attribute. Can someone explain it to me? Is it harmful in any way? Can it be removed?
Is this right: first: -sudo apt-get-repository -y ppa:webupd8team/java -sudo apt-get update -sudo apt-get install -y oracle-java8-installer than sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6 or sudo apt-get install lib32stdc++6 For Install Android Studio: $ sudo add-apt-repository ppa:paolorotolo/android-studio $ sudo apt-get update $ sudo apt-get install android-studio
Please tell me the full process of installing Android Studio and its necessary dependencies.
I want to make a selection tool that I can use to select a feature point in ArcGIS for Desktop so I can combine it with a form that I just made to display the form after the feature selected. I use VBA but, because I'm newbie, I don't really understand which interface that I should use.
Is there a way to select a point from my map's current extent? I want to use ArcObjects to tell me if there is at least one point visible in my extent. I'd like to do this entirely in VBA, and without selecting any features or using any mouse-click events. (Selection can be done programmatically, just not manually.) An demonstration would show that I have a point-type shapefile active and positioned at the top of my Table of Contents. I run my code which then displays a message box showing the longitude and latitude of the first point that is found within the current extent. Any point can be found and it's coordinates returned, just as long as that point is within the given extent.
Can anyone explain What are access modifiers in java in easy language ? With examples ?
In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?
Scenario: returns to play. I play and exile Llanowar elves. Changeling Hero is destroyed. Does Llanowar elves get returned by the champion trigger?
The rules for the Unearth ability are as follows: 702.82a Unearth is an activated ability that functions while the card with unearth is in a graveyard. Unearth [cost] means [Cost]: Return this card from your graveyard to the battlefield. It gains haste. Exile it at the beginning of the next end step. If it would leave the battlefield, exile it instead of putting it anywhere else. Activate this ability only any time you could cast a sorcery. If I unearth a creature, and then cast to exile and return it, does the replacement effect cause Flicker to lose track of it, or is Flicker still able to see the exiled card and return it to the battlefield? (Are there similar combinations of spells or abilities that would result in a different outcome?)
Okay, I have installed a program that gave me many, many PC viruses that can't be deleted, so should I run System Restore? Thanks.
What should I do if my Windows computer seems to be infected with a virus or malware? What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware? This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.
I have the below HTML and jquery snippet, the new rows are added correctly and the the rows are deleted when clicked on which is expected but for the .delete_row click it isn't calculated the row count correctly after a row is deleted. So say I have added 3 custom rows, I click to delete one row, it will delete and a alert box will display, if I click to delete a second row the process will alert twice and when I click to delete the third row the alert will pop up 3 times. A single alert should only ever display when one row is removed but it's like the delete a row is incrementing by one on each run, cant see why though!? $("#add_row").on("click", function(e) { e.preventDefault(); var row_num = $(this).data("id"); var row_limit = 50; var code_snippet = '<div class="row"><dd>' + row_num + '</dd><dt><span class="delete_row" title="Delete Custom Row"><i class="fas fa-times"></i></span></dt></div>'; if (row_num <= row_limit) { $("#count").val(row_num); $(code_snippet).insertBefore("#base"); row_num += 1; $(this).data("id", row_num); } if (row_num >= row_limit) { // Disable button once limit reached $(this).attr("disabled", true).addClass("disabled"); } $(".delete_row").on("click", function(e) { $(this).parent().parent(".row").remove(); alert("Deleted Row"); $("#add__row").data("id", ($("#add__row").data("id") - 1)); }); }); <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <fieldset> <dl> <div class="row row_header">Header Title</div> <div class="row align_right" id="base"> <input type="hidden" name="count" id="count" value="0" /> <button id="add_row" data-id="1">Add New Row</button> </div> </dl> </fieldset>
I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off. This happens on page ready and works just fine. The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound. I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.
All I must do for this code is display the current year, month and day of the year using the GregorianCalendar class. for some reason everything is right but the month. The program returns the month as being 11 instead of 12. Any suggestions? /** * @param args the command line arguments */ public static void main(String[] args) { GregorianCalendar Calendar = new GregorianCalendar(); int year = Calendar.get (GregorianCalendar.YEAR); int month = Calendar.get (GregorianCalendar.MONTH); int day = Calendar.get (GregorianCalendar.DAY_OF_MONTH); System.out.println("the current year is " + year); System.out.println("the current month is " + month); System.out.println("the current day is " + day); }
In java.util.Calendar, January is defined as month 0, not month 1. Is there any specific reason to that ? I have seen many people getting confused about that...
I have a timezone string, for example, "Pacific Time (US & Canada)". I need to get the equivalent of 3pm in that timezone in UTC for particular dates, including daylight savings time. How can I go about this? For example, I need to find 3pm on December 3rd, PDT in UTC time.
I have a web page with three dropdowns for day, month and year. If I use the JavaScript Date constructor that takes numbers, then I get a Date object for my current timezone: new Date(xiYear, xiMonth, xiDate) Give the correct date, but it thinks that date is GMT+01:00 due to daylight savings time. The problem here is that I then pass this Date to an Ajax method and when the date is deserialised on the server it has been converted to GMT and so lost an hour which moves the day back by one. Now I could just pass the day, month, and year individually into the Ajax method, but it seems that there ought to be a better way. The accepted answer pointed me in the right direction, however just using setUTCHours() by itself changed: Apr 5th 00:00 GMT+01:00 to Apr 4th 23:00 GMT+01:00 I then also had to set the UTC date, month and year to end up with Apr 5th 01:00 GMT+01:00 which is what I wanted.
Let's say we bet on 10 different soccer matches. The probability of our team winning, for each game, is 0.17, 0.78, 0.41, 0.79, 0.47, 0.08, 0.29, 0.30, 0.35, and 0.54. What is the probability of winning at least 3 of these bets? I know how to deal with this problem when the probability of each event is the same (coin tosses etc), but get confused when they are different.
I am interested in how uncertainty can be accounted for when considering the risk of extinction of a species. Forgive me for extending a rather tired thought experiment, but at least it's familiar territory and I hope it illustrates what I am trying to understand. Let's say that Schrödinger was not satisfied with killing and not killing only one cat, so he went out and collected the last 15 remaining Himalayan Snow-Cats. He put each one in a box with a vial of poison, hammer, and a trigger device for releasing the hammer. Each trigger device has a known probability of releasing the hammer within any given hour, and the poison will take 5 hours to kill a cat (things got a bit trippy when he used radioactive decay, so this time he steers clear of quantum mechanics). After one hour, Schrödinger receives a notice from the ethics board telling him he's nuts and ordering him to release the cats immediately. He pushes a button which opens a cat-flap at the back of each box, thus releasing them all back into the wild. By the time the humane society check the boxes, all the cats have bolted. Before anyone can restrain him, Schrödinger detonates the remaining triggers, so nobody knows how many of the cats were poisoned. The probability that each of the cats is poisoned is as follows: 0.17 0.46 0.62 0.08 0.40 0.76 0.03 0.47 0.53 0.32 0.21 0.85 0.31 0.38 0.69 After 5 hours have elapsed and all poisoned cats have died, what is the probability that there are: (A) More than 10 Himalayan Snow-Cats still alive (B) 10 or less still alive (C) 5 or less still alive (D) 2 or less still alive
I have a program that contains two files: a python script and a shell script that downloads www.bing.com wallpaper and put it for my desktop background. When I run this it works but it dosent work by my cron. I have made a cronjob for that program but it dosen't work. My cron entry is: 42 */4 * * * /home/ahmad/myBing/bingwallpaper.sh my code: #!/bin/bash # Get download link and store it on downLink . downLink=$(/home/ahmad/myBing/index.py) # Making pic name . picName=$(echo $downLink | cut -f7 -d"/") # Set picture options # Valid options are: none,wallpaper,centered,scaled,stretched,zoom,spanned picOpts="zoom" if [ $downLink != "net is off" ] then mkdir -p $HOME/Pictures/BingDesktopImagePython/ # Download the link by wget . wget -O $HOME/Pictures/BingDesktopImagePython/$picName "$downLink" &> /dev/null # Set the GNOME3 wallpaper gsettings set org.gnome.desktop.background picture-uri "file://$HOME/Pictures/BingDesktopImagePython/$picName" # Set the GNOME 3 wallpaper picture options gsettings set org.gnome.desktop.background picture-options $picOpts else echo -e "Net is off :(" fi # Exit the script exit and my python script: #!/usr/bin/python import re import requests import BeautifulSoup import os def getLink(): if os.uname()[0] == "Linux": baseUrl = "http://www.bing.com" imgUrl = "http://www.bing.com/HPImageArchive.aspx?format=xml&idx=1&n=1&mkt=en-US" try: html = requests.get(imgUrl) # Get xml code . except: print ("net is off") # it runs if net is off . else: soup = BeautifulSoup.BeautifulSoup(html.content) link = soup.find('url',text = re.compile('(.jpg)$')) #Get first <url> ... </url> string . downLink = baseUrl + link # make download link . print (downLink) else: print ("Your os should be Linux.") exit() getLink()
I'm trying to change my wallpaper to a random image using Indrajith Indraprastham's suggested script here: When I run the script from a terminal window, the bg changes just fine, but when it's run from cron, I'm mailed this error: (process:21901): dconf-WARNING **: failed to commit changes to dconf: Error spawning command line 'dbus-launch --autolaunch=00216c114dcf433c9bb9009985d607d6 --binary-syntax --close-stderr': Child process exited with code 1 I would appreciate any suggestions.
I did a clean install of Ubuntu 14.04 but I can't install Catalyst. When I try to install the driver it displays an error that there is no compatible adapter. I tried it with the stable and the beta driver. Any clues?
I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver? There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:
(When I finished my computer Sci degree, I decided not do as PhD as I believed that in order to get a programmer position, most employers valued 3 years more experience as a programmer greater then a PhD.) Reading this site, it seems normal for a PhD to take 5 years, however in the UK most people expect a PhD to take not much more 3 years unless the student is being lazy. If I saw the CV of someone applying for a computer programmer job unrelated to their PhD and they spend 5 years on a PhD, I would questions if they were worth interviewing just on that bases.
I'm an undergrad in Australia, and at this stage I want to go on to do further study in maths (or maybe physics/CS, still have a few years till then). Should I do so, I imagine that I will want to complete a PhD overseas. Possibly at a university in the US or maybe Oxbridge in the UK. In Australia, PhDs typically take 3 or 4 years, and I would be eligible to go straight into a PhD upon completion of my undergraduate degree (it is research focused and includes an honours year, see ). But, much of what I have found for overseas institutions has been in the range of 5-7 years, or maybe a 3-4 year PhD with a few years doing a master's degree beforehand. Does this indicate that the level of rigour and amount of work produced is significantly different for various PhD programs, or is it the case that some programs are more relaxed and simply spread the same amount of work over a longer period of time?
I'd like to know is his proof was reviewed, and what exactly happened.
Back in August 2012, Japanese mathematician Shinichi Mochizuki announced a proof of the using . What has been the status of his proof? Has there been any progress made in verifying it?
I have a schematic that has the intersected circles that IMOD and IBIAS arrows point to and I wonder about its meaning edit : if I know that this symbol is a current sink ..how can the Control IC change the current passing through the LD ? and how can I relate the resistor connected to IMODN to current in LD ?
In the datasheet for a A3503 Hall Effect Sensor, I saw a circuit diagram labeled 'Functional Block Diagram', and it shows a symbol I have not seen before. It's shown here between 3 - Output and 2 - Ground. What is this supposed to represent? The full datasheet is available
What's the significant difference between Expressions vs Literals && Expressions vs Statements in Java? I'm aware that an expression represents a simple value or a set of operations that produces a value. However, literals can also be a simple value which makes it a little confusing to make difference between them. Could smb explain the differences? Thanks in advance!
I'm asking with regards to c#, but I assume its the same in most other languages. Does anyone have a good definition of expressions and statements and what the differences are?
I have a 500GB drive and 20.0GB drive and i want to do a little experiment and see if i can make them be 1 : HOW I DO THAT ON Gparted ?
everyone. I need to create LV for xen guest. There is only one disk of 70G. While installing, I use the default process and not the LVM. Do I need to reinstall Ubuntu to create the LV? Is there some better method? Thanks a lot. root@vswitch-BlackfordESB2:/home/vswitch# vgdisplay No volume groups found root@vswitch-BlackfordESB2:/home/vswitch# vgcreate vm /dev/sda1 No physical volume label read from /dev/sda1 Can't open /dev/sda1 exclusively. Mounted filesystem? Unable to add physical volume '/dev/sda1' to volume group 'vm'. root@vswitch-BlackfordESB2:/home/vswitch# pvdisplay root@vswitch-BlackfordESB2:/home/vswitch# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 60G 4.2G 53G 8% / udev 3.6G 4.0K 3.6G 1% /dev tmpfs 1.5G 1.1M 1.5G 1% /run none 5.0M 0 5.0M 0% /run/lock none 3.6G 0 3.6G 0% /run/shm
I have a requirement to do a script for gather some data from one db and formatting according to a requirement, this should run by a scheduled cron job. but there should not be parallel runs. (If one process is running, then other should not start). Help me to do this in bash scripting.
A solution that does not require additional tools would be prefered.
I upgraded Ubuntu 12.02 to 14.04 and upgraded all packages with command sudo get-apt -f install. I dont know what happened but I am not even able to open Terminal or any applications. I can't see dashboard and window border. I dont know what to do? Please help me out from this problem.
When I login, nothing happens. I am presented with my desktop wallpaper. No Dash, no Launcher, nothing.
I've often heard public lectures describing the degenerate, exotic matter left behind after a star collapses but fails to go supernova; one that has found its way to become a neutron star. The speaker will often describe a tablespoon of the exotic material consisting mainly of neutrons, weighing hundreds if not thousands of tons. It seems to me what keeps such degenerate material stable is the whole gravitational force of the neutron star, but I realize I may be wrong. Perhaps it's reached a state of stability under its own forces once the force of gravity created this exotic matter? So hypothetically speaking if one could scoop up a tablespoon of neutron soup from the collapsed star, transport it back to earth, and somehow contain its extreme weight, would the matter remain stable - or would it fly apart?
I've read on NASA's page on neutron star that one teaspoonful of that star would weigh over 20 billion tonnes on Earth. If it was somehow possible to bring it to earth would it: Burn and disappear during Earth atmosphere entry? Assuming we have 20 billion tonnes of mass occupying the volume of a teaspoon here on Earth, would it fall through the ground under its own weight?
When I try this in MySQL: select make,count(*) as num from TABLE where num > 100 group by make I got: Error Code: 1054, SQL State: 42S22] Unknown column 'num' in 'where clause' Is there a way to limit count(*)?
I have a simple query: SELECT u_name AS user_name FROM users WHERE user_name = "john"; I get Unknown Column 'user_name' in where clause. Can I not refer to 'user_name' in other parts of the statement even after select 'u_name as user_name'?
Prove that $\sum_{k=1}^\infty \sqrt{k+1}-\sqrt{k}$ diverges. I know that this diverges but I don't know how to prove it rigorously. Should I use the comparison theorem? I know that $\sqrt{k+1}-\sqrt{k}>-\sqrt{k}$ so I just need to show that $\sum_{k=1}^\infty -\sqrt{k}$ diverges. But that is where I am stuck.
Does the following series converge or diverge? $$ \sum\limits_{n=1}^\infty\frac{1}{\sqrt{n}+\sqrt{n+1}} $$ The methods I have at my disposal are geometric and harmonic series, comparison test, limit comparison test, and the ratio test.
On Stack Overflow, when you search for "ceres-solver", you find (today) . Almost all related to . When I posted a new question on this library earlier today, I created the new tag "ceres-solver", fine. Then, I started adding the tag to the few first questions of the search result. But I'm wondering if there could be a way to add a new tag to a bunch of questions at once, rather than having to edit them all one by one....doing so is a real pain, and it would really make sense to add the tag to all those posts...
Is it possible to tag multiple questions at the same time? If not, should this feature be added? I've wanted to do this several times when I do a search for a topic, and many of the matches do not have a certain important tag, but should. For example, a search for "boost asio -[boost-asio]" returns a lot of questions that are extremely specific (not just perpherially related) to boost::asio, and should have the [boost-asio] tag. Adding the tag to each of them individually is possible, but it would be less daunting if there was a way to mark the appropriate questions from the search results and tag them all at once. (Even if this is a bad example for some reason, hopefully you get the idea). I'm anticipating arguments that this shouldn't be possible because it would make it too easy for people to mistag things in batch. In that case, I'd argue that it similarly also makes it easier for people to fix things in batch, and should only be available for folks with high enough privileges that we should trust them anyway.
So all my friends keep telling me that if you add up all the numbers from 1 to infinity, (1+2+3+4...) then the answer is -1/12. They showed me this proof with infinite sums, but I didn't understand it, so all I'm asking is does it really equal -1/12?
$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$. Why should analytically continuing to $\zeta(-1)$ give the right answer?
I moved to an apartment with an older TV. There was a DVI-I to HDMI converter with the TV already so I just plugged the HDMI from my video card to that adapter. The question is what is the best way to transfer audio in my situation? It had a AUX to some light(maybe transmitter?) left in a drawer but I’m really not sure for what is it. There are Beolabs 6000 connected to the TV too.
Does DVI carry audio? My monitor has 4 HDMI inputs and I am going from a device that only has DVI output will the audio follow on the DVI to HDMI adapter?
I saw ~ before the path of repository. chmod a+x ~/bin/repo What does ~ do here?
I'm new to Linux and Ubuntu. People keep using ~/filename in their answers to my questions. What does ~/ mean?
Show that infinitely many positive integer pairs $(m,n)$ exist such that $\frac{m+1}{n}+\frac{n+1}{m} \in \mathbb{N}$. I couldn't solve it but I did make an observation which might or might not be helpful. WLOG assume that $m < n$ (since the term is symmetric wrt $m,n$ along with the fact that ignoring the $m=n$ case wouldn't create any trouble). Write $n=mq+r$ for some $r\in \{[0,m-1]\cap \mathbb{N}\}$. Now, the question boils down to showing $\frac{m+1}{n}+\frac{r+1}{m} \in \mathbb{N}$. Note that each of the summand is $\leq 1$. Since the equality case wouldn't be helpful in generating infinitely many pairs of $(m,n)$, we can safely say that the sum is equal to $1$. Now I don't know how to proceed from here.
The question is: Show that there are an infinite number of pairs $(m,n): m, n \in \mathbb{Z}^{+}$, such that: $$\frac{m+1}{n}+\frac{n+1}{m} \in \mathbb{Z}^{+}$$ I started off approaching this problem by examining the fact that whenever the expression was a positive integer, the following must be true: $$\frac{m+1}{n}+\frac{n+1}{m} - \left\lfloor\frac{m+1}{n}+\frac{n+1}{m}\right\rfloor = 0$$ However, I was unable to do much more with this expression, so I abandoned it and started the problem again from a different angle. Next I re-arranged the expression to state that: $$\frac{m^2+m+n^2+n}{mn} \in \mathbb{Z}^{+} \implies \frac{m(m+1) + n(n+1)}{mn} \in \mathbb{Z}^{+}$$ And therefore: $$mn \mid (m(m+1) + n(n+1))$$ However, I'm unsure how to demonstrate there are infinitely many occurances of $(m, n)$ for which this is true. So I'd appreciate any help. Thanks in advance
Should I install my text editor from the ubuntu software store or download it manually? And how do I download it manually?
How can I install applications like Google Chrome on Ubuntu? Are there any commands to install an application? Index of answers:
I had earned the hat but its description states that you can earn this hat posting a question/answer, or voting on December 18th Ask, answer, or vote on December 18th I'm at UTC+1 and today is not Dec 18th...Is this a typo or whatelse?
I just got the hat which states "post or vote on December 21". Does SE have a time machine now?
I am populate a pick list value from design resource.But it is not loading value in the picklist. component: <aura:attribute name="Recordtype" type="String" access="global"/> <aura:handler name="init" value="{!this}" action="{!c.doInit}"/> <ui:Inputselect aura:id="Recordty" value="{!v.Recordt}"/><br/> Controller js: doInit : function(component, event, helper) { var opts = []; var inputsel = component.find("Recordty"); var recur = component.get("v.Recordtype"); for(var i=0;i<recur.length;i++){ opts.push({"class": "optionClass", label: recur[i], value:recur[i]}); } inputsel.set("v.Recordt", opts); } Design resource: <design:component> <design:attribute name="Recordtype" datasource="Account,Contact,Lead,Opportunity"/> </design:component>
I have a requirement to create a Lightning component that contains a ui:inputselect tag which will automatically fetch out its options from a custom pick list of an Object. How can this be achieved?
I am making a top down shooter in Java and I need to be able to shoot in a line tangent to the mouse coordinates. In other words I need to be able to click my mouse and have a projectile spawn from my player, then move its position in a straight line in the direction of where I clicked. I have tried this already and I have failed miserably, and after looking into it for a while I haven't found a good answer. The code is pasted below, any ideas on what I'm doing wrong? The mouse angle is calculated like this: mouseAngle = (float) Math.toDegrees((float) Math.atan2(e.getY() - Player.getY(), e.getX() - Player.getX())); VectorMath class package vector; public class VectorMath { public VectorMath() { } public static void copyVector(Vector2f v1, Vector2f v2){ v1.setX(v2.getX()); v1.setY(v2.getY()); } public static void printVector(Vector2f v){ System.out.println("x: " + v.getX() + " y: " + v.getY()); } } Projectile Class package projectile; import java.awt.Color; import java.awt.Graphics2D; import player.Mouse; import player.Player; import vector.Vector2f; import vector.VectorMath; public class Bullet { private Vector2f pos = new Vector2f(0, 0); private float x,y, xVel, yVel, moveSpeed = 0.1f, dX, dY;; private float mouseAngle; public Bullet(Vector2f pos) { VectorMath.copyVector(this.pos, pos); VectorMath.printVector(this.pos); x = Player.getX(); y = Player.getY(); mouseAngle = Mouse.getMouseAngle(); } public void update(){ xVel = pos.getX() + (((float)Math.cos(mouseAngle)) / moveSpeed); yVel = pos.getY() + (((float)Math.sin(mouseAngle)) / moveSpeed); dX = x + xVel; dY = y + yVel; x = dX; y = dY; } public void render(Graphics2D g2){ g2.setColor(Color.green); g2.fillRect((int)x, (int)y, 10, 10); } }
I have two objects (target and player), both have Position (Vector3) and Rotation (Quaternion). I want the target to rotate and be facing right at the player. The target, when it shoots something should shoot right at the player. I've seen plenty of examples of slerping to the player, but I don't want incremental rotation, well, I suppose that would be ok as long as I can make the slerp be 100%, and as long as it actually worked. FYI - Im able to use the position and rotation to do plenty of other things and it all works great except this last piece I cant figure out. Code samples run in the Target's class, Position = the targets position, Avatar = the player. EDIT Im now using Maik's c# code he has provided and it works great!
In general, the refractive index of a certain medium tends to decrease with increasing wavelength. But are there any materials in which the opposite phenomenon occurs? That is, in which the refractive index increases with increasing wavelength (which would lead to an "inverted" spectrum, if a light beam reached said material)?
I was studying a problem where optical light with a wavelength of 500 nm travels through a gas with refractive index $n$. If we look at the equations for wave motion and index of refraction $$c=\lambda_0\nu\quad\text{(in vacuum)}$$ $$v = \lambda\nu\quad\text{(in medium)}$$ $$n = c/v$$ we see that, if the frequency is constant, the wavelength decreases in the medium compared to vacuum. Is this a consistent property at all frequencies and for all mediums with refractive index real and greater than 1? Are there dielectrics which change the frequency (still for n > 1), and is there an example of that?
The OP was trying to put his answer in a question, but this was rejected as radical change. Should I copy this answer from the question and place it as a new answer? Without copying this information it is simply rejected and lost. Sample copied answer:
Reference question: Sometimes users solve their own questions, which is great. Sometimes they say they've solved it and move on, which is not so great. The above question is middle-ground: the user posted an answer to his own question, but as an edit to the question instead of as a real answer. Should any action be taken in such a case? The obvious solution is to copy the edit into a real answer. But is this the right solution? In this case, the answer is a little hidden and there are no other answers, so it appears on the unanswered list. Related:
I hope this is the right place to post this. If you go to the rather lengthy link below you'll see that it is one of my questions, with comments, and answers here on Scifi Stackexchange. I'm not sure if this is a copyright violation or if it's just a companion site. I wanted to bring it to everyone's attention just in case. I hope I posted this in the right place and did the right thing. Thanks
of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means: Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow: You have to provide . Simple links to the original post and author info are just fine. You have to and allow other people to use your content, as long as they follow these very same rules. How meta! (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.) There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short). In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery. So, the question is: what can you do if you spot a SCRAPER?
I have installed Ubuntu into its own partition but when I boot my Acer laptop it takes me straight into windows I have checked boot menu nothing and I have checked the primary is and it only has windows Can someone help me with a method on how to switch between Ubuntu and windows
I installed Ubuntu 14.04 onto my Acer Aspire E15. The PC has a 500 Gigabyte HDD. During the installation it divided the HDD into separate partitions. However every time I turn on the PC it goes directly into Windows 8.1. It doesn't allow you the opportunity to select which OS you want to use. Question 1: How do I set the PC so it will allow me to select the OS? Question 2: And if #1 isn't possible. How to I remove Ubuntu from the PC and recover the partition for Windows
I am trying to update a variable in a struct, from a function. It is compiling fine but is not changing the value. I am using the Arduino framework and have the following header myLib.h #include "Arduino.h" class gaugeClass{ public: byte devAddr; template<typename T> void readReg( T dataParam ){ dataParam.val = 0x07; } struct Flasht{ struct Thresholdt{ byte val = 0x01; } threshold; } ; }; with an instantiation of the struct in myLib.cpp #include "myLib.h" gaugeClass::Flasht myData; Then in my main code, I call the readReg function #include "Arduino.h" #include "myLib.h" gaugeClass myLib; extern gaugeClass::Flasht myData; void setup(){ Serial.begin( 115200 ); Serial.println( myData.threshold.val, HEX ); //this reads 01 myLib.readReg( myData.threshold ); Serial.println( myData.threshold.val, HEX ); //this also reads 01 } void loop(){} I want the readReg function to update the value in the struct in the myData instance, but it is not doing it. I can correctly read the value of myData.threshold.val from the readReg function, but I cannot write to it. Any help appreciated Thanks
What is the difference between a parameter passed by reference a parameter passed by value? Could you give me some examples, please?
I want to find in the system a file, and I know part name of it. How could I do that? I tried unsuccessfully the command: find / "*partname*" The problem is probably very easy however I cannot find a decent tutorial on searching files in linux. Such one that explains searching in whole system files, in subfolders, recursively, for part of specific expression(s) or excluding. Please tell me what command solves my problem and if you know a good tutorial so that I can understand how to use various parameters for searching, post a link. Thank you so much.
I need to search for files starting with some particular name. There can be multiple files starting with a particular pattern and I want to list all such files present in the directory.
The only reason why I put it here is to find out whether I am a victim or just ignorant of the way brokers deal with option positions that were exercised. Whether I am a victim or just ignorant will depend on your answer posted here. The facts are: I had a 2 SHORT QS Option at 75 which was exercised against me on the 23 Dec 00.45 AM and I later exercised my 2 LONG QS Option at 70 on 23 Dec 9.31 AM. The broker charged me Borrow Fee for 24-27 Dec for $1102, which means instead of getting $1000 profit I turn this into a loss of $102 plus comm. My question: Since both long and short options were exercised on the same day one at 45 mins on 23 Dec and the later at 9.31 am on the same day, how can there be a SHORT POSITION in the stocks since both are net-off in my account ? The answer I got from my broker and this is the point that I want to clarify. The response I got from IB was that the initial exercise at 45 mins on 23 Dec was actually on 22 Dec (not 23 as I alleged). They refused to show me how they got 22 Dec. This is my explanation to my Broker in reply. 4.Even if the short call and long call were exercised on different dates 22 and 23 Dec respectively, IB can only charge me for the SHORT position for one day and not from 24-27 Dec by ignoring my long call position was not there. My Broker ignored my answer and insisted the dates are correct and therefore I was charged to borrow shares that needed to satisfy the short position on exercised. So I am lost as I do not know whether the broker is correct and they can do this by ignoring my long call position after exercised or there is something else. I hope I have explained this clearly now and this is not an opinion as some suggested to cut my question down. This is how I responded to the broker and their silence is the reason why I am here, hoping to get clarity as to the way options long and short are settled.
The only reason why I put it here is to find out whether I am a victim or just ignorant of the way brokers deal with option positions that were exercised. Whether I am a victim or just ignorant depends on the answer that I posted here. The facts are: I had a 2 SHORT QS Option at 75 which was exercised against me on the 23 Dec 00.45 AM and I later exercised my 2 LONG QS Option at 70 on 23 Dec 9.31 AM. The broker charged me Borrow Fee for 24-27 Dec for $1102, which means instead of getting $1000 profit I turn this into a loss of $102 plus comm. My question: Since both long and short options were exercised on the same day one at 45 mins on 23 Dec and the later at 9.31 am on the same day, how can there be a SHORT POSITION in the stocks since both are net-off in my account ? The answer I got from my broker and this is the point that I want to clarify. The response I got from IB was that the initial exercise at 45 mins on 23 Dec was actually on 22 Dec (not 23 as I alleged). They refused to show me how they got 22 Dec. This is my explanation to my Broker in reply. Even if the short call and long call was exercised on different dates 22 and 23 Dec respectively, IB can only charge me for the SHORT position for one day and not from 24-27 Dec by ignoring my long call position was not there. Further Facts: My Broker ignored my answer and insisted the dates are correct and therefore I was charged to borrow shares that was need to satisfy the short position on exercised. So I am lost as I do not know whether the broker is correct and they can do this by ignoring my long call position after exercised or there is something they had not tell me. That is the reason I came to this site soliciting answers from those who know more than I do or had experienced the same. I hope I have explained this clearly now and why would I want to give an opinion when I am looking for an answer ?
Similar questions have been asked before and the easy fix was to just update the BIOS and use an option in it for swapping the keys. However, even with the most recent BIOS update from Lenovo, there is no such option in BIOS. Is there any way to swap the Fn and Ctrl keys at BIOS level? I found some sort of patch in the article , but it only seems to work on Windows. Any ideas would be more than welcome.
I'd like to swap the Fn and Ctrl keys on my ThinkPad W500 (like many others! See: and ) Numerous folks indicate that Windows doesn't register the Fn key as a keypress but using , that gives the ASCII value of a keypress, I see the Fn key returning FF (perhaps FF in this case means 'not registered'). I also see that keys like Ctrl register with one ASCII code when pressed alone and another when pressed in combo with another key. Fn will only register when pressed alone, so Windows definitely isn't seeing the combo. This took a solution like AutoHotKey off the table. I ran (which shows you the hardware scan codes of a keypress and the Fn key registerd as 57443). Using this program I remapped Fn to the Ctrl key; this worked perfectly. However, I suspect that because of the issue in #1, the combo of, for example, Fn + C did not execute a copy. Short of retraining my pinky I'm actually considering removing the keyboard and resoldering the connections to swap those keys. I'd love to get some input as to the root technical issue(s) and possible solutions here.
I am using Ubuntu 18.04. I am unable to install Canon 2525 network printer. I have tried using drivers from website.
I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2. How do I solve this? Are there proprietary drivers for my Canon printer or scanner?
From what I understand, the disk device has a queue that stores read/write requests from the linux kernel. What happens when the device doesn't drain the queue fast enough (i.e. overflows)? Does this queue extend (logically) into DRAM? can some requests be lost?
I am programming a server and it seems like my number of connections is being limited since my bandwidth isn't being saturated even when I've set the number of connections to "unlimited". How can I increase or eliminate a maximum number of connections that my Ubuntu Linux box can open at a time? Does the OS limit this, or is it the router or the ISP? Or is it something else?
In lots of C++ book I have seen they use overload operator '( )' . I still don't understand when and how to use it. For example I know how to implement or overload '+' operator for a class or '='. I also exactly know when to use these operators but just cant understand about operator '()'. Can some please guide me may be by an example. I have googled and I found about tutorials related to overloading .
I keep hearing a lot about functors in C++. Can someone give me an overview as to what they are and in what cases they would be useful?
I created my own environment and it in/for a KOMA-class. It works fine, except that the first paragraph after it has an indentation. It want it to have no indentation at all, which is why I use false- for the class. How can I set that indentation to zero? Screenshot MWE \documentclass[ 11pt, a4paper, ] {scrartcl} \usepackage{ lmodern, blindtext } \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{ multicol, blindtext, } \newenvironment{teaser}{\vspace{0ex}\par\raggedright\sffamily}{% \par% \rule{0.8\columnwidth}{1pt}\par \vspace{2ex}% } \listfiles \begin{document} \begin{center}\huge Title stuff \end{center} \begin{multicols*}{2} \section{Word} \begin{teaser} Stuff. Word, some text to fill the void. Here is a longer sentence, quite the long one. \end{teaser}% % How do I have to define the new environment \verb|teaser| so that the first paragraph after it has no indentation? Words words words words words words words words words words words words words. Words words words words. \end{multicols*} \end{document}
This question led to a new package: Edit: package is broken since nov 2019. See my comment below for more info. [may 2021] There are a number of environments which I never want to follow up with an indented paragraph. itemize, enumerate, theorem, definition, etc. I know there are people who this is bad style. But it's a personal preference. Those environments basically always end a paragraph for me, so the visual clue is not needed in my case. I've found several similar questions, but none of them do what I need: That third one was actually most useful, but appears to be unreliable for patching existing environments with. It doesn't seem to be working in my memoir document. To be clear, I don't want to remove the actual paragraph break. That's a semantic concept. I just want to patch the document style so that paragraphs following certain environments remain unindented. I've tried the following two 'solutions' (which use etoolbox for patching): \newcommand*{\noindentnext}{\everypar{{\setbox\z@\lastbox}\everypar{}}} \newcommand*{\NoIndentAfterEnv}[1]{\AfterEndEnvironment{#1}{\noindentnext}} \newcommand*{\NoIndentAfterCmd}[1]{\apptocmd{#1}{\noindentnext}{}{}} \NoIndentAfterEnv{itemize} \NoIndentAfterEnv{theorem} ... This one is loosely based on the third post from the list above. It sometimes works. It sometimes does nothing. I'm unable to predict when it will fail. The second: \let\old@par\par \newcommand*{\noindentnextpar}{\def\par{\let\par\old@par\par\noindent}} \newcommand*{\NoParIndentAfterEnv}[1]{\AfterEndEnvironment{#1}{\noindentnextpar}} \newcommand*{\NoParIndentAfterCmd}[1]{\apptocmd{#1}{\noindentnextpar}{}{}} I invented this one myself. It breaks when the patched environment is not followed by a paragraph. It has also shown itself to inexplicably fail in other situations. Once and for all, I'd like to have a reliable way to do this. Let me give an example of what I need, just to be clear: \NoIndentAfterEnv{itemize} \begin{itemize} \item ... \end{itemize} This starts a new paragraph. Note the empty line. But it should not be indented. But this paragraph \emph{should} be indented.
How to install Canon LaserShot LBP2900b Laser Printer on Ubuntu 20.04
How can I install Canon LBP2900B on Ubuntu 14.04 LTS ? I tried the method for the installation of LBP2900, but it didn't work. I tried installing the CanonCaptDrv190 as outlined in the Community wiki and answers #1 by Alvar. #2 by SarveshM @ but neither approach worked for me. The printer is switched on and has pages in tray and connected through USB. EDIT: I followed the Ubuntu 13.10 installation method of Community Help Wiki again. Now I get this On command 4 (sudo update-rc.d ccpd defaults) - update-rc.d: warning /etc/init.d/ccpd missing LSB information update-rc.d: see System start/stop links for /etc/init.d/ccpd already exist. On seeing captstatusui for LBP2900, I get - Message : No Specified Printer In the below box I get - Check the (Printer asterix,asterix,asterix (the symbol)) of /etc/ccpd.conf I tried your method, Elder Geek but it didn't work. Any more ideas? Regards, Andy
@track data; @track columns = [{ label: 'Name', fieldName: 'Name', type: 'text', sortable: true }] @wire(getAccountlist) accountList({data,error}){ if(data){ this.data= data; for(var i=0;i<data.length;i++){ this.columns.push({label : 'Info', ...this.data[i].Info__c&& {fieldName:'Info__c'},type: 'text',sortable: true}) } } } The column that I'm dynamically adding is not being added to the data table.
Am not doing anything fancy, just trying to update a field on Contact in JS of LWC but getting this exception. Uncaught TypeError: 'set' on proxy: trap returned falsish for property 'Name' throws at mydomain/auraFW/javascript/mhontaYdOya4Y_lBu7v9yg/aura_prod.js:2:27687 HTML Code: <template> <template if:true={wiredContact}> {wiredContact.Name} <lightning-input value={wiredContact.Name} onchange={updateName}></lightning-input> </template> </template> JS: import { LightningElement ,wire,track,api } from 'lwc'; import myContact from "@salesforce/apex/ContactController.fetchContact"; export default class Myrefreshapextest extends LightningElement { @track wiredContact; @wire (myContact) fetchedContact({error, data}){ if(data){ console.log(JSON.stringify(data)); this.wiredContact = data; }else if (error){ console.log(error); } } updateName (event){ console.log(JSON.stringify(event.detail.value)); console.log(JSON.stringify(this.wiredContact)); this.wiredContact.Name = event.detail.value; } } Apex: public class ContactController { @AuraEnabled(cacheable=true) public static Contact fetchContact(){ return [SELECT Id,Name FROM COntact LIMIT 1]; } } On top of my head, am not doing anything wrong, anyone has idea what's wrong with my code? When I print console.log(JSON.stringify(this.wiredContact)); I get old values so am pretty sure it exists. I tried with @track and @api, but same response. Can anyone shed some light?
Background: In cases(mainly in End to End UI tests), where a number of test paths(selection of alternative test steps) can be huge due to combinations however expected results are same and few. In those scenarios, I strongly feel the need to introduce an element of randomness to pick a test path as we are finding more and more issues manually while following a particular random path whereas the standard automated E2E test mostly passes following the primary flow. Context: In the end-to-end scenario consisting steps let's say [A-Z] where any of the steps may have alternative sub steps[a- g] can be run either on web/mobile app so if we vary any of the sub-steps in user journey, we are finding issues on some specific sub-steps selection but not in general.Also we cannot afford to run each unique combination of selection due to huge combinations either manually or by automation. Problem statement: What is the standard/accepted common wisdom to design the randomness in alternative sub steps selection in end to end UI tests? Edit: Adding more meaningful example Example: An long user journey, consisting of multiple steps where each step independently can be done on either web or mobile app. And cases were found where doing some step in mobile doesn't reflect back in web app or vice versa.
Several months ago I started an experiment in test automation. Each test, before it starts, picks up random test data. For instance, when my test requires a user with administration privileges, I draw a random account and then I from a group of admin users for this account I draw a random admin user. The reason for using random test data was two-fold: First, when we were using static, i.e., hard-coded test data, sometimes tests started to fail, because test data no longer existed in DB, e.g., a user has been removed from the database (we're having production dump in our test DB, so I guess the user has been deleted in production). When we started to find such users at runtime, the problem disappeared. Second problem was that it was not really clear why certain test data were used for a certain test. We have inherited tests from the other team and couldn't understand their intentions behind, for instance, using user "[email protected]". By writing queries to find data, we started to explicitly state what type of test data we want, e.g., that we want a user with administration privileges. While my approach solved both problems, it introduced also some new issues: Tests occasionally fail, because they pick up wrong test data. This is because queries are sometimes incorrect. For instance, once a test drawn a random account that had no administrators at all. Good thing about that is that this way I keep learning new things about the system under tests, e.g., that there must be business reasons to have accounts without administrators. Test setup becomes more and more complex, as queries start to grow and thus tests seems now a bit more complex to understand. I was also hoping to increase coverage and find more bugs by using random test data just like it is done in fuzz testing. Instead, I mostly found bugs in my test and learned how little I know about the system under test. Finally, ROI doesn't seem big. Before the change there was a cost of maintaining static test data (updating test data if they were outdates). Now I have to maintain complex queries when the test takes "wrong" test data and this tends to occur more often than outdating of static test data previously. I wonder whether using random test data really makes sense and how to do it right?
I use Xubuntu 12.04.1 LTS (xfce) with Thunar file manager. I ran this command: rm ~/.local/share/applications/wine-extension-jpe.desktop And one Wine context menu item has gone. How do I remove the other one?
The dialog box in question here is the one you get with the context menu option "open with other applications". Wine seems to have inserted more than a dozen or so entries for each application I install, which makes it a pain to find the correct application: What can I do to remove the duplicates? Update: Neither of the two solutions really work. The bug is interesting, but the symptoms does not match my problem (I'm not having problem with uninstalling applications, but rather the things that are inserted after installing them), and with the other one, all references to the Wine application are removed, which actually makes the problem worse (although it may be an acceptable solution if nothing else can be found). So this is still an open question; any takers?
Is there any way to produce doc/docx files from LaTeX?
I often have to write up reports based on the analysis of some data. I use R to analyse the data and export tables, figures, and text. This is then included into a LaTeX document either using input or Sweave (). However, when I collaborate with others, I sometimes need to provide a document in Open Office / MS Word format. Question: Thus, assume the simplest scenario I have a LaTeX document with text, tables, and figures I need to export this reliably into Open Office or MS Word format: this includes mathematical formulas, table formatting, and quality figures) I don't need to go back from MS Word to LaTeX What is a reliable, efficient, and preferably free process? Initial Thoughts: Export to HTML, LaTeX - LyX - ODF Use odfWeave that deals with some specific issues associated with LaTeX to Open Office conversion I was hoping that there is an expert out there who has worked out a good system already.
What is even a separate fiscal year different from that of a calendar year? A detailed answer to this is most welcome. I am asking this particularly in Indian context.
There are many companies that have their year end occur on dates other than December 31. What are the advantages to this?
The two sentences here both indicate that, at some point in the past, I performed some work: I did work I worked What is the difference between these two sentences? Does constructing one with did and the other with a simple past change the meaning?
This morning I read this sentence (see ): On July 24th and again on July 29th, Egyptian police did shoot dead unarmed African migrants attempting to cross that border. Why "did shoot" and not "shot"?
I am trying to configure apache2 with cgi (python). For that, I have to change permissions of some folders and files but I am getting sudo fatal errors every time I try to change the permission of a file or a Folder. For Example: 1 j@ubuntu:/etc/apache2$ ls apache2.conf envvars magic mods-enabled sites-available conf.d httpd.conf mods-available ports.conf sites-enabled j@ubuntu:/etc/apache2$ sudo chmod 777 httpd.conf sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins ................................................................................... 2 j@ubuntu:/usr/lib/cgi-bin$ sudo /etc/init.d/apache2 restart sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins ................................................................................... 3 j@ubuntu:/usr/lib$ sudo chmod -R 777 /usr/lib/cgi-bin sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins ................................................................................... Note: j@ubuntu:/etc/apache2$ ls -l /usr/lib/sudo/sudoers.so -rwxrwxrwx 1 root root 177452 Jan 31 2012 /usr/lib/sudo/sudoers.so
Whenever I try to install or remove something using terminal it gives the following error message: bluebird@bluebird:~$ sudo apt-get update sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins bluebird@bluebird:~$ sudo apt-get remove vlc sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins bluebird@bluebird:~$ sudo apt-get install apt-file sudo: /usr/lib/sudo/sudoers.so must be only be writable by owner sudo: fatal error, unable to load plugins
I wrote an answer on one of the Stack Exchange sites a while ago, but I don't remember where. How can I find it by a keyword?
I am able to view all the answers given by me and questions asked by me, but not able to search a string in them? Currently I have no other choice than clicking each ques/ans link manually (very hectic) ?
So today I chimed in on IPS and scrolled a bit. This question caught my eye, because it had a number in it. Something like that I haven't seen in a long time, if ever. Then I read the title and was confused at first, because it started with ends in 4 days How do I... This is obviously not proper English. It took me some time to realize that the text size isn't even the same, because the difference is very little in my opinion. Also, I don't see any reason why that text is necessary in the title. It gives no additional incentive to answer the question It seems like it's part of the question title It's already obvious that the question has a bounty The time until a bounty runs out is already visible inside a question This update looks better or worse depending on the site style, but overall I think that it's not something that is needed and has more drawback than it adds. So I am wondering why this text has been added in the first place and if it can be removed again? Perhaps a per-site solution is possible. I am open to discussion about it (mostly interested in what that text adds to the user experience).
I think this is a very recent design change, because I've not seen it before: Where before a small box with the bounty value dislocated the title a couple of characters to the right, now the additional text saying how long until it expires dislocates the title by about a quarter of the width of the column. I find that this makes it much harder to read the title, and is counterproductive to the goal of attracting attention.
As a general rule, I try not to fudge the rules unless it hurts my players' fun not to do so. In the final encounter of my last scenario, an NPC I had written as a hook into the next adventure was killed outright by a specter's Life Drain. When asked if that NPC was dead (during combat) I responded in the affirmative. He failed his CON save, and his max HP was lowered to 0 by the damage. Albeit selfishly, I began rolling death saves for the NPC behind the curtain. One of my veteran players was confused after a previously-dead NPC stabilized and was able to talk with them once healed. We ended up in a drawn-out OOC discussion, and clearly he was unsatisfied. He seemed to think I overstepped my bounds as a DM, and I think he may be right. Did I "cheat" my PCs with what seemed like a harmless fudge?
When I started my first D&D campaign as a DM, I accidentally rolled and confirmed a crit on a PC from a goblin. It was an instant kill as our campaign had no cleric. That time I decided to fudge the dice. Now, there's a similar problem, but this time the PCs are at 3rd level and they are dealing with a very important NPC. If they fail this one diplomacy check, the entire game world will fall apart, as the king would then send his entire army against the PC's homeland and will destroy it, plunging my entire game world into chaos, at which time drow that I wanted to save for a later adventure will have to come out, which will instigate a wizard's guild to release their secret ultra-deadly virus, and everything in my game world, including the PCs, will die. So should I fudge the dice roll? When is it good to fudge it?
How to prove that $$\sum_{k\geq 1} \frac{1}{2^k k^2}=\frac{\pi^2}{12}-\frac{1}{2}\log(2)^2$$ without using the well-known $\operatorname{Li}_2\left( \frac{1}{2} \right)$ ? Edited : Thanks for L.F , but I should have made it clear that I want an answer using only series manipulations .
My teacher posed an infinite series question to me today and I'm not quite sure how to start to go about it. $$\sum_{r=1}^{\infty} \dfrac{2^{-r}}{r^{2}}$$ Any hints would be much appreciated.
'Everyone who doesn't cook their food' Is it correct? If it's correct then can you explain why do we use doesn't but the possessive pronoun is Their?
Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase? Each student should save his questions until the end. Each student should save her questions until the end.
I was searching for answers for one of many daily issues we all normally have and found something quite odd. After finding Stack Overflow, I've stumbled upon , which is an exact copy of the first one. Should this be allowed? I thought about posting on Stack Overflow, but I believe that this matter is about Stack Exchange as a whole.
of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means: Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow: You have to provide . Simple links to the original post and author info are just fine. You have to and allow other people to use your content, as long as they follow these very same rules. How meta! (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.) There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short). In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery. So, the question is: what can you do if you spot a SCRAPER?
Is there a way to log root commands from SSH on OpenVZ Node? I tried Snoopy and I was not able to exclude everything and leave only SSH commands. @edit I want log ONLY commands sent through SSH/SFTP from remote host, because on my openvz node root is used to run many other commands locally. For example Snoopy is logging everything that happens on system (that is a lot of trash..), but I want to see what is done by any person on root by SSH/SFTP.
It is company policy for admins to login to the servers via a personal username, and then run sudo -i to become root. Upon running sudo -i, sudo will create an environmental variable called SUDO_USER, which contains the original user's username. Is there a way to log ALL commands within syslog with something akin to the following syntax: ${TIME/DATE STAMP}: [${REAL_USER}|${SUDO_USER}]: ${CMD} An example entry would be: Sat Jan 19 22:28:46 CST 2013: [root|ksoviero]: yum install random-pkg Obviously it doesn't have to be exactly the above syntax, it just has to include a minimum of the real user (eg. root), the sudo user (eg. ksoviero), and the full command that was run (eg. yum install random-pkg). I've already tried snoopy, but it did not include the SUDO_USER variable.
My workplace allows me to use a Mac, but doesn't have much experience with them; their support is minimal if well intentioned, and generally as much harm as help. This includes installing antivirus software etc. Recently, both Safari and Chrome have started showing the "This connection is not private" error with most off-site URLs. This is a recent change, and includes web sites I was able to access last week. I'm running MacOS 10.14.6 (18G87) with all updates. This isn't a question of our IT deliberately blocking sites, as I can access them from my Windows computer (and in any case it includes sites that are clearly work-related). In some cases, but not all, I'm able to bypass the warning by following the accepted answer for (i.e. clicking through the "show details" buttons and entering my password), but this doesn't always work, and is pretty inconvenient besides. I've also tried the other answers from that question, but these do not work. This is perhaps not surprising as that question refers to development work which involves self-generated SSL certificates, and my situation doesn't involve these. I've also tried turning off antivirus software (insert scare quotes as you like), and that didn't help. Note: When I look at the certificates on the problematic sites, I see the site's certificate but it's underneath a certificate issued by my workplace, and the browser shows my workplace's certificate as "Untrusted". I don't know how certificates work, but I'm guessing this is the problem and what I need to do is somehow make my browsers trust my workplace's certificates. Any suggestions for working around this problem?
I am doing development work. We have some test equipment that uses a self-generated SSL certificate. When I try to browse to the equipment in our lab, I get an error that "this connection is not private". However, the only 2 options available are "Show details" and "Go Back". Show details just lets me look at the info on the certificate, which shows all of the expected self-signed details. There is no way to tell safari to acknowledge the error and continue onwards. At least not obviously. How do I bypass this error and continue onwards? I'm using safari 11, on OS X sierra.
I have the following php code where by a for loop create different variables. Basically what I need is, after run the code below, it should create different variables such as $o1, $o2, $o3 etc. But it is not working based on the way I implemented. Does anyone can help me how to solve this? for($i = 0; $i <= $totalOa; $i++){ '$o'.$i = $pieces[$i]; }
I want to store courseworks marks of n courseworks into n variables, such as cw1 and cw2 etc. Using variable variables how can I come with cw1, cw2 etc. How can I dynamically create variables?
For example, my parents, my parents' parents, my children, my children's children etc. Everybody in my family tree vertically. I need specifically person, and "both" ancestors and descendants; not one or the other, and not both in general including side relationships such as siblings or cousins.
There are a lot of words describing ancestral relationships between people, such as: parent grandparent great-grandparent any of the above can be described as an "ancestor". child grandchild great-grandchild any of the above can be described as a "descendant". I am wondering if there are single words (nouns) which describe any of the following concepts: A person and all of his/her ancestors A person or any of his/her ancestors A person and all of his/her descendants A person or any of his/her descendants Any ideas?
I have created a sample Django application with multiple models within it and populated data. Now, I need to add a new column to one of the models? Here are my concerns? What will happen if I do syncdb after adding a column to the model , will it just alter the table and add the new column? Or will it create a new table after deleting all the columns? Is there any better way to tackle this issue?
I'm considering using Django for a project I'm starting (fyi, a browser-based game) and one of the features I'm liking the most is using syncdb to automatically create the database tables based on the Django models I define (a feature that I can't seem to find in any other framework). I was already thinking this was too good to be true when I saw this in the : Syncdb will not alter existing tables syncdb will only create tables for models which have not yet been installed. It will never issue ALTER TABLE statements to match changes made to a model class after installation. Changes to model classes and database schemas often involve some form of ambiguity and, in those cases, Django would have to guess at the correct changes to make. There is a risk that critical data would be lost in the process. If you have made changes to a model and wish to alter the database tables to match, use the sql command to display the new SQL structure and compare that to your existing table schema to work out the changes. It seems that altering existing tables will have to be done "by hand". What I would like to know is the best way to do this. Two solutions come to mind: As the documentation suggests, make the changes manually in the DB; Do a backup of the database, wipe it, create the tables again (with syncdb, since now it's creating the tables from scratch) and import the backed-up data (this might take too long if the database is big) Any ideas?
I have 2 similar string except some special character. Is there a better way to compare and check for equality? string str1 = "Hello (T) How"; string str2 = "Hello [T] How"; if (str1.Replace("(", "").Replace(")", "").Replace("[", "").Replace("]", "") == str2.Replace("(", "").Replace(")", "").Replace("[", "").Replace("]", "")) { Console.WriteLine("Equal"); }
I wonder if there is an easy way to check if two strings match by excluding certain characters in the strings. See example below. I can easily write such a method by writing a regular expression to find the "wild card" characters, and replace them with a common character. Then compare the two strings str1 and str2. I am not looking for such implementations, but like to know whether there are any .Net framework classes that can take care of this. Seems like a common need, but I couldn't find any such method. For example: string str1 = "ABC-EFG"; string str2 = "ABC*EFG"; The two strings must be declared equal. Thanks!
yoooo guys, im eric from taiwan, and i am planning to continue my nomad life in the uk after virus( hopefully), since i am a low budget traveler with no income right now, but i have 7000us dollars in my bank account right now, is that enough to be acceptable by officer?? Q2: ive done some research and some information point out that its better if i could have receive money from work or from people montly, meaning " i have stable money resource" , i could transfer my other bank account to my main account every month 300us dollars, could this work?? thank you so much guys:))
The UK Visas and Immigration Directorate publishes that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine). Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available. These must clearly show that you have access to the funds, such as: bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided The first item is "bank statements" and this ties in with the , which says... evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?
How does a light move in a material? " aa= moves in a vacuum --> captured by an atom for 10^(-8) sec --> vacuum -> captured by an atom --> and so on. " Is aa= true? you can say something about "10^(-8) sec" capturing time too because i dont know, i might hear about it somewhere long long ago. Is this why the speed of light is slower than a vacuum?
I know that if we solve the Maxwell equation, we will end up with the phase velocity of light being related to the permeability and the permittivity of the material. But this is not what I'm interested in - I want to go deeper than that. We know that the real speed of light is actually not changing, the decrease in speed is just apparent. Material is mostly empty, the light will still travel with $c$ in the spacing. The rare atoms will disturb the light in some way. So I am interested in how the atoms affect the light. Photon absorption-emission theory Some textbooks that I read explain it in a way kind of like this: In a material the photons are absorbed by atom and then re-emitted a short time later, then they travel a short distance to the next atom and get absorbed&emitted again and so on. How quickly the atoms in a material can absorb and re-emit the photon and how dense the atoms decides the apparent speed of light in that material. So the light appears slower because it has a smaller “drift speed”. Interference theory But recently I realize an alternative explanation: Atoms respond to the light by radiating electromagnetic wave. This “new light” interferes with the “old light” in some way that results in delayed light (advanced in phase), this can easily be shown by using simple phasor diagram. Consequently effectively the light covers a smaller phase each second, which gives the impression of a lower phase velocity. However the group velocity is changing in a complicated way. I think that the first explanation does not explain the change in phase velocity of light. if we consider light travelling into a slab of negative refractive index non-dispersive material, let’s say the light is directed perpendicular to the slab. The phase velocity’s direction will be flipped, but group velocity’s direction in the material will not change. Only the second explanation can explain the flipped phase velocity direction. I guess that the velocity that we get in the first explanation is actually belongs to the group velocity. It makes sense to me that the front most of the photon stream determines the first information that the light delivers. So the question is What really cause the phase velocity of light to be decreased? "drift velocity" of photons (they aren't the same photons, they are re-emitted all the time) phase difference between absorbed and emitted light something else And also, I still don't really understand detailed explanation of the absorption-emission process for small light's wavelength (for large lambda compare to the atoms spacing, the photons will be absorbed by the phonons). The dispersion relation that we know is continuous and also some material is non-dispersive, therefore the absorption process must occur in all frequency for a certain range. So definitely it doesn't involve the atomic transition, otherwise it will be quantized. My guess is that the relevant absorption process gets smooth out by the dipole moment. What makes the spectrum continuous? EDIT: link for dispersion relation:
While searching for an answer to another I developed a a helper class that would work with any kind of container of integers. Specifically, my class would lookup container values based on some criteria. In order to work with different types of containers, my class obviously needs to operate not on containers themselves but on their iterators. I don't need to reference containers anywhere in my class, I use only iterators and only in class constructor. // Header file. class MyLookup { public: template<typename ForwardIt> // Forward iterator though sequence of integers MyLookup(ForwardIt begin, ForwardIt end) ... } // Implementation file template<typename ForwardIt> MyLookup::MyLookup(ForwardIt begin, ForwardIt end) { ... } // Use file std::vector<int> foo; ... MyLookup lookup(foo.begin(), foo.end()); While using CLang the initial compiler pass succeeds but then I get linker errors: Undefined symbols for architecture x86_64: "MyLookup::MyLookup >(std::__1::__wrap_iter, std::__1::__wrap_iter)", referenced from: ... Any idea what am I doing wrong?
Quote from : The only portable way of using templates at the moment is to implement them in header files by using inline functions. Why is this? (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)
I am trying to write a simple RSS Reader. I think i done but I get exception with "null" message. JavaDoc said that it is possible to get this value so it's nothing strange. But how could I find out what is wrong with my code? and main: public static void main(String[] args) throws MalformedURLException { URL url = new URL("http://facet.wp.pl/rss.xml"); Feed feed = new Feed(); RSSParser parser = new RSSParser(url); parser.RSSFeed(); for(String wejscia : feed.entries){ System.out.println(wejscia); } } @EDIT The exception is at RSSParser.RSSFeed(RSSParser.java:28) and i have already know that it's a NullPointerException
What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them? What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?
I know that str.replace(/x/g, "y")replaces all x's in the string but I want to do this function name(str,replaceWhat,replaceTo){ str.replace(/replaceWhat/g,replaceTo); } How can i use a variable in the first argument?
I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it. However, I can't figure out how to pass a variable in to a regex. I can do this already which will replace all the instances of "B" with "A". "ABABAB".replace(/B/g, "A"); But I want to do something like this: String.prototype.replaceAll = function(replaceThis, withThis) { this.replace(/replaceThis/g, withThis); }; But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?
In Westeros it is popular belief that after taking a liking to Lyanna Stark, Prince Rhaegar kidnapped and raped her. However, the belief amongst fans seem to be that: Lyanna also fell in love with Rhaegar and ran away with him by choice. I understand that this theory cannot have just been drawn out of the blue but as a non book reader I have seen next to no evidence for this in the show. So what evidence is there behind this theory?
What is the story behind Rhaegar and Lyanna? I remember reading in one of the books that Rhaegar won the tourney at Harrenhal and named Lyanna Stark the Queen of Love and Beauty. And there's also a mention elsewhere where Robert Baratheon says "if Rhaegar hadn't laid eyes on Lyanna, she would have been alive". Was Rhaegar responsible for Lyanna's death/suffering directly or indirectly?
So I made a model with a material that has a complex node system and I want to export that material so that I could apply it to the model. Is there a way to do such a thing?
I used node textures in a mesh I exported to .FBX. I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine. Is there something I'm doing wrong or is it Blender?
I Made Bad Mistake And Disable All Users In SQL Is There Any Way With cmd Or RegEdit To Enable One User?
I lost the sa password on a machine, and when I log in to the machine directly using an account in the admin group, SQL Server Management Studio will not allow me to log in using Windows authentication. My plan was to simply log into the server, connect via Windows Authentication, and reset sa to use a new password. Since I cant' connect via Windows Authentication, this won't work. How else can I reset the sa password?
Is there a way to compute minimum distance of a code given a systematic parity check matrix? I know that min dist is smallest number $d$ such that there exists $d$ linearly dependant columns. I am looking in particular to find minimum distance of binary (codes over $\mathbb{F}_{2^l}$) quasi-cyclic of rate q/q+1. Parity check matrix for such codes have a structure $H=[I|C_1|C_2|...|C_m]$ where each $C_¡$ is a from class of circulant matrices. It may be useful that one can treat these codes as modules. Or even if there are any approximate algoruihms for this ?
Is there a way to compute minimum distance of a code given a systematic parity check matrix? I know that min dist is smallest number $d$ such that there exists $d$ linearly dependant columns. I am looking in particular to find minimum distance of binary (codes over $\mathbb{F}_{2^l}$) quasi-cyclic of rate q/q+1. Parity check matrix for such codes have a structure $H=[I|C_1|C_2|...|C_m]$ where each $C_¡$ is a from class of circulant matrices. It may be useful that one can treat these codes as modules. Or even if there are any approximate algoruihms for this ?
I know that we can say if $A$ is real then it has real eigenvalues, but is the opposite always true (i.e. if $A$ has real eigenvalues then it is Hermitian)?
Let us say I know that a given $N\times N$ matrix has all its eigenvalues as real, does it mean, it is hermitian. How do I prove (or disprove) that?
Sorry for the question but I'm new to blender and have recently found this gun model on Sketchfab that I would like to use . After downloading it and opening up the .fbx file in Blender, I was shown the same model but with very weird textures. The textures folder contains the following files but I am unsure on how to apply them to the gun model in Blender.
I created some texture maps in MindTex to use in Blender, but I can't figure out how to properly hook them up. The maps I have: - Diffuse - Normal - Height - Specular - Gloss - Self Illumination - Reflection - Ambient Occlusion MindTex (left) vs. Blender (right) As you can clearly see it's a pretty big difference. is my material node setup in Blender. In the examples I don't actually use self illumination or reflection images, but including this in the answer would be helpful.
When I run the following query Oracle returns 0.9999999999999999999999999999999999999999. select 1/3 * 3 from dual; However when I execute the following Oracle returns 1.0: select 1/to_float(3) * 3 from dual; Why the difference?
Consider the following code: 0.1 + 0.2 == 0.3 -> false 0.1 + 0.2 -> 0.30000000000000004 Why do these inaccuracies happen?
Are there any tricks/tips to connect my Samsung Galaxy S3 to Wi-Fi ad hoc network shared by my laptop?
I have an unrooted Android 2.3.6 phone and I want it to connect to the ad-hoc connection made on my Ubuntu. I referred to some already existing questions here but none seem to be the solutions for unrooted phones. How do I do this?
What I want is to find within a directory all the files containing a match and when it finds the match it shows the file where that match was found. example cat * | grep password: Here it will show me all the matches that have a "password:" But it doesn't show which file the match belongs to.
I want to find all files which contain a specific string of text. The grep command works, but I don't know how to use it for every directory (I can only do it for my current directory). I tried reading man grep, but it didn't yield any help.