text
stringlengths
175
47.7k
meta
dict
Q: Difference between require and load wrt to "load" and "execute" Below are some snippets from the documentation for Kernel: Kernel#load Loads and executes the Ruby program in the file filename... Kernel#require Loads the given name... I know there are differences between require and load for example: require w...
{ "pile_set_name": "StackExchange" }
Q: Declaring a variable and setting its value from a SELECT query in Oracle In SQL Server we can use this: DECLARE @variable INT; SELECT @variable= mycolumn from myTable; How can I do the same in Oracle? I'm currently attempting the following: DECLARE COMPID VARCHAR2(20); SELECT companyid INTO COMPID from app where ...
{ "pile_set_name": "StackExchange" }
Q: Questions about calculating a transaction ID As I know, Transaction ID is calculated from H( H(tx_prefix) || H(tx_stuff) || H(Signatures) ) Where tx_prefix = {tx version || keyoffset || keyimage || one-time addresses || extra} tx_stuff = {signature type || tx fee || pseudo output commitments || ecdhInfo || output...
{ "pile_set_name": "StackExchange" }
Q: How to make flashlight Blink in android In my code after exiting from thread the flash light is still on. I can't understand the logical error. How can I turn the flash light off at the end of the thread? Thread thread = new Thread((new Runnable() { @Override public void run() { SystemClock.sleep...
{ "pile_set_name": "StackExchange" }
Q: Suppose $p$ is a polynomial with real coefficients. Then which of the following statements are necessarily true? Suppose $p$ is a polynomial with real coefficients. Then which of the following statements are necessarily true? There is no root of the derivative $p$' between two real roots of the polynomial $p$. Th...
{ "pile_set_name": "StackExchange" }
Q: Backlight adjustment not working in Lenovo IdeaPad Y580 I installed Ubuntu 13.04 on my Y580, and I added the acpi_backlight=vendor option to the bootloader. The OS boots without the black screen now, but I can't adjust the brightness with Fn+Up/Down keys. Is there any solution for this? A: Alright solved this on...
{ "pile_set_name": "StackExchange" }
Q: Parsing an enum with the Flags attrubute not giving expected value My enum: [Flags] public enum EqualityOperator { Equal, NotEqual, LessThan, LessThanOrEqual, GreaterThan, GreaterThanOrEqual, Like, ...
{ "pile_set_name": "StackExchange" }
Q: Did Salman the Persian meet Isa AS? ‘Asim b. ‘Umar b. Qatada on the authority of a trustworthy informant from ‘Umar b. ‘Abdu’l-‘Aziz b. Marwan said that he was told that Salman the Persian told the apostle that his master in ‘Ammuriya told him to go to a certain place in Syria where there was a man who lived...
{ "pile_set_name": "StackExchange" }
Q: turbolinks / redirects after a delete Having a delete response handled via js, I'm reloading the curent page via turbolinks. In other words : // onclick setup encapsulates the following axios({ method: "delete", url: e.target.getAttribute("href"), headers: Csrf() // passes the csrf token to keep things 'rail...
{ "pile_set_name": "StackExchange" }
Q: Как поснимать checkbox Имеется Чек Бокс вот такого вида, как на него нажать, при помощи, Python + Selenium? <input data-v-3719c1ac="" type="checkbox" testid="ns-chbox"> A: Альтернативный, более лаконичный, и, кстати, быстрый способ нахождения этого элемента - это "by css selector": checkbox = browser.find_by...
{ "pile_set_name": "StackExchange" }
Q: принадлежность переменной к списку в Python есть функция: def checkSomething(var,varList): if var in varList: doSomeStuff() else: print("error") передаваемые значения таковы, что ветка else не должна выполняться(например, var=354, varList=[123,321,354]). Вывод переданных значений перед про...
{ "pile_set_name": "StackExchange" }
Q: Extrema of Real-Valued Functions Let $ f(x,y) = 1 + xy + x - 2y $ and let $ D $ be the trangular region in $ \Bbb R^2 $ with vertices $ (1, -2) $ , $ (5, -2), $ and $ (2, 1) $. Find the absolute maximum and minimum values of $ f $ on $ D $. Give all the points where these extreme values occur. A: Welcome to the ...
{ "pile_set_name": "StackExchange" }
Q: Remove/Hide Text at Footer of Contact Form I'm using Wordpress and FormGet. When I paste the HTML code of the contact from of FormGet into a page on my site (http://jrbweddings.com/contact/) it adds a "Report Abuse' text at the bottom of the form. Is there a way to remove this or make the text white? It has an 'a'...
{ "pile_set_name": "StackExchange" }
Q: obtener JSON creado por API con JQUERY Estoy tratandod e consumir un API a traves de Jquery, al momento he logrado conectarme sin problema e incluso obtengo la respuesta del API el cual tiene el siguiente formato: { "status": "OK", "status_codes": [ 200 ], "status_messages": [ { "request": "R...
{ "pile_set_name": "StackExchange" }
Q: Best practice for recursive class Problem: I want to build a class for a custom dice. But it should also provide the following: Every side can contain an other dice The number of sides should be dynamically expandable, but must at least contain one Logically the dice need to have a currentSide Every side has a ...
{ "pile_set_name": "StackExchange" }
Q: Where does the "arguments" variable come from in "this.callParent(arguments)"? While learning ExtJS 4, I found out that while defining a new class, in the initComponent method the constructor of the parent class can be called using this.callParent(arguments). I would like to know where this arguments variable (I k...
{ "pile_set_name": "StackExchange" }
Q: MySQL: Which join is better between left outer join and inner join Which join is better peforming if all of them provides the same result? For example, I have a two tables employees(emp_id,name, address, designation, age, sex) and work_log(emp_id,date,hours_wored). To get some specific results both inner join and ...
{ "pile_set_name": "StackExchange" }
Q: How do I call a method inside ApplicationHelper from my Model? # application_helper.rb def do_some_stuff ... end # my_model.rb def my_model_method # I want to call the method "do_some_stuff" here, how exactly? end Obviously, I can't just call do_some_stuff, since it would tell me that the model does not ...
{ "pile_set_name": "StackExchange" }
Q: How to Map Database Lookup Tables Automatically on Insert (Oracle) I have existing tables that are pretty much denormalized. There are no lookup tables for things list status, type, country, etc... This original design was done just to simplify the application's access to the database, so there was no performance ...
{ "pile_set_name": "StackExchange" }
Q: java.lang.NullPointerException in jsp Hi all I am a fresher in java and jsp and honestly I dont have knowledge of json. but I have some requirement that I have to pull the data from database and display on jsp page. but the criteria is that I have to use Bootstrap Data Table why I am using this because it provide...
{ "pile_set_name": "StackExchange" }
Q: How to output variables such as the current page's entry_id in the script tag One one of our sites, we have ChannelFiles add-on installed and in the control panel (when editing an entry) it outputs a useful set of variables (see attached). But this is only part of add-on and if it's not installed, those variables ...
{ "pile_set_name": "StackExchange" }
Q: Double Summation $\sum_{i=1}^{n+1}\sum_{j=0}^{n-1}(i+j)=(2n+1)\sum_{r=1}^n r=3\sum_{r=1}^n r^2$ It can be easily shown by step-by-step and rather messy summation over $j$ and then over $i$ that $$\sum_{i=1}^{n+1}\sum_{j=0}^{n-1}(i+j)=\tfrac12 (2n+1)n(n+1)$$ Note that RHS is equivalent to $$\displaystyle (2n+1)\sum...
{ "pile_set_name": "StackExchange" }
Q: Comparator - overloading the operator < I am trying to use the std::set to contain a struct of three member variables. struct blah{ int a,b,c; bool operator < ( const blah& blo ) const{ return ( a < blo.a || (a == blo.a && (b != blo.b || c != blo.c ) ) ); } }; But I keep getti...
{ "pile_set_name": "StackExchange" }
Q: Haskell - Maybe arithmetic I have been asked to implement a function which uses the following profile: maybe_divide :: Maybe Integer -> Maybe Integer -> Maybe Integer and responds in the following manner: > maybe_divide (Just 5) (Just 2) Just 2 > maybe_divide (Just (-5)) (Just 2) Just (-3) > maybe_divide (Just ...
{ "pile_set_name": "StackExchange" }
Q: `@Transactional` not working for Spring 2 controller I have an old controller within my app that is defined as a spring bean in xml and makes use of Spring's SimpleFormController. I've tried to make the processes within the onSubmit method of the controller transactional by adding the @Transactional annotation but...
{ "pile_set_name": "StackExchange" }
Q: How to inner join two select queries on same table I am stuck... A 'data' table with columns 'value' and 'datatype' is populated with engine load and vehicle speed and each record is stamped with date, time, lat, long. I want to query for engine load over 10% while the vehicle is moving (e.g. speed > 0). I can ...
{ "pile_set_name": "StackExchange" }
Q: form submission not working? I had this simple form.. where I was taking an input from user like the following <form action="/data" autocomplete="on" method="POST"> <input id="search" name="search" type="text" placeholder="Search for song or artists.."> <input id="search_submit" value="Submit" type="submit"> </...
{ "pile_set_name": "StackExchange" }
Q: Command Query Separation violation What do you think about if(!DoSomething()) return; In Clean Code this is viewed as violation of Command Query Separation. But how can we understand if something in command DoSomething() went wrong? What about sql command (ex: void Delete(Table))? How can we know if that table ...
{ "pile_set_name": "StackExchange" }
Q: Not allowing user exit the app using Home Button In my app i do not want the user be able to exit my app on pressing the Home press key. There's a specific reason for not allowing the user to do this. Can anyone suggest what can be the correct way to achieve this? At present what i am doing is Overriding the onKey...
{ "pile_set_name": "StackExchange" }
Q: Merge or Combine Two Array Into Single Array I have a case to create or merge two arrray into single array. First array like this : Array // First Array ( [0] => Array ( [hotel] => cempaka [vendor] => mas ) [1] => Array ( [hotel] => permata ...
{ "pile_set_name": "StackExchange" }
Q: Checking visibility of layer in KineticJS I am trying to figure out how to check whether or not a layer in KineticJS is visible. I need this in order to appropriately toggle the visibility of any given layer when the user clicks a button. If it's visible, I want to hide it when they click the button. If it isn't v...
{ "pile_set_name": "StackExchange" }
Q: Remove all just before closing I would like to remove any <br> tag which comes up just before a closing </p> tag. For example this is ok : <p>Bla bla bla <br> bla bla </p> But this is NOT ok : <p>Bla bla bla <br> </p> In other words, every time I have : <br> + white space or tab or new line or whatever providi...
{ "pile_set_name": "StackExchange" }
Q: Obscure error on Symfony on form->handleRequest() and validation I have a Symfony 2.8.9 application where a single form cause a big obscure error on the line $form->handleRequest($request); My form is very simple : just an id and a commentaire field. It seems the error occurs during validation tasks (the full tra...
{ "pile_set_name": "StackExchange" }
Q: Laravel adding middleware inside a controller function as the title says I want to use a middleware inside a controller function. I have resource controllers, which their functions inside will have different access rights so I can't use a middleware in the web.php file, I have to use or apply it separately in each...
{ "pile_set_name": "StackExchange" }
Q: Python for loop ignoring if statement For some reason python is ignoring my if statement, even if the str(search) is in my list lista it still prints the elif statement regardless. Am I doing something wrong? search = input("what would you like to search for?:") for n in range(len(lista)): if str(sear...
{ "pile_set_name": "StackExchange" }
Q: Angular Code Coverage wrong output My stack is: Angular.js, Karma, Karma-coverage (Istanbul) and Jasmine. I have been running Code Coverage analysis over my app, the problem, and thus the question, is that I get Service A marked as covered by tests (in green) when it actually does not have any tests associated. I ...
{ "pile_set_name": "StackExchange" }
Q: Why does limit not exist? I don't understand how the limit does not exist for the composite function. The limit as x approaches -2 for g(x) is zero. So, the last step is to evaluate h(0), which is -1. Yes, there is a hole at x=0 but that doesn't mean you can't evaluate h(0). A: It's true that $\lim_{x\to-2}g(x)=...
{ "pile_set_name": "StackExchange" }
Q: Input 0 of layer conv1d_1 is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: [None, 200] I'm working on application that should predict interesting moments in 10 sec audio files. I divided audio on 50ms chunks and extracted notes, so I have 200 notes for each example. When I add co...
{ "pile_set_name": "StackExchange" }
Q: Python print hyperlinked text to Spyder Console I'm using the WinPython distribution on Windows 7, which comes with the Spyder IDE (and I hope this will work the same on Anaconda). I would like to know how to print hyperlinked text to the console output. I assume it's possible, because when I get an error in my c...
{ "pile_set_name": "StackExchange" }
Q: How do I organize strings into a table in visual c#? I was trying to sort up strings into grids in Visual c#, but couldn't do it. What code do I need to do so? I've already tried going to many websites and writing the code specified, but it did not work. I was expecting at least something, but all I got was a blan...
{ "pile_set_name": "StackExchange" }
Q: Can Akka Actors replace Service layer? This is more of a design and best practices question. I am converting an app to use Actors and Futures. Currently these are the layers (before Akka is in the mix) . Play Controller -> Service layer -> (Slick) DAOs Now want to have something like Play Controller -> Actors ...
{ "pile_set_name": "StackExchange" }
Q: Is it possible to generate .docx files without having MS Word installed? I want to use "OLE automation" (or whatever it's called now) to generate a Word document. I assume that it's possible to perform the following programmatically: Set page size (height, width, margin vals) Set font type/name, style, and size Ad...
{ "pile_set_name": "StackExchange" }
Q: Modify a string in a .properties file with batch I am trying to modify a certain property in my csm.properties by executing a script. I looked up a lot and in the end, came to this code. set "search=CLASSPATH" set "insert=CLASSPATH^=plugins^/Numbering.jar^\^:" set "textFile="%workingPlace%bin\csm.properties"" ...
{ "pile_set_name": "StackExchange" }
Q: Java bytecode asm - How can I create a clone of a class with only the class name changed? Java asm - How can I create a clone of a class with only the class name changed ? I know that there's a simple way to modify the class name using asm SimpleRemapper, but I just want the outer class name changed without modify...
{ "pile_set_name": "StackExchange" }
Q: How to update package? when I use `<< PhysicalConstants`` I get the message like :General::obspkg: PhysicalConstants is outdated... see the Compatibility Guide for more infomation... The question is how to update it? My version is MA9.0. A: It can't be updated. The Physical Constants package is obsolete as of 9...
{ "pile_set_name": "StackExchange" }
Q: Twitter Trending List Printing First Character Instead of First Entry I'm having an issue where I can get the Twitter API to provide me with the top 10 list of trending topics in a given area, but I can only get the entirety to print, or the first character to print, but not the first entry in the list. The follow...
{ "pile_set_name": "StackExchange" }
Q: How does trading work? During the last event (The one that spawned a ton of Ralts with increased shiny chance) I got multiple shiny Ralts. My friend didn't get any so I wanted to trade him one of mine. But when I tried it said that I didn't have enough stardust. It doesn't say how much more I need it just says I c...
{ "pile_set_name": "StackExchange" }
Q: Random graph with $p \ll n^{-1+\epsilon}$ a.a.s has no subgraph with $k$ vertices with at least $k+1$ edges Let $G=(n,p)$ with $p \ll n^{-1+\epsilon}$ for all $\epsilon >0$. Then for each $k\in \mathbb{N}$ there are a.a.s no $k$ vertices with at least $k+1$ edges. Proof: We want to show $$\Pr(\exists S\subset...
{ "pile_set_name": "StackExchange" }
Q: vectorizing a script with cellfun I'm aiming to import data from various folder and text files into matlab. clear all main_folder = 'E:\data'; %Directory of data TopFolder = dir(main_folder); %exclude the first two cells as they are just pointers. TopFolder = TopFolder(3:end); TopFolder = struct2cell(Top...
{ "pile_set_name": "StackExchange" }
Q: How to stop R from creating empty Rplots.pdf file when using ggsave and Rscript I have an R script that saves some plots using ggsave. When I run the script from the command line, it not only saves my plots but also an empty Rplots.pdf file. How can I prevent R from creating this unnecessary file? Here is an examp...
{ "pile_set_name": "StackExchange" }
Q: Looping through a range using a msgbox I have hit a bit of a wall when looping through a range. What I have done is created a table which when a qty is selected in the table a range from that table is transported to another array on the next blank line. What I would like to do to speed up the process is if I would...
{ "pile_set_name": "StackExchange" }
Q: Bad lighting using Phong Method I'm trying to make a cube, which is irregularly triangulated, but virtually coplanar, shade correctly. Here is the current result I have: With wireframe: Normals calculated in my program: Normals calculated by meshlabjs.net: The lighting works properly when using regular size tr...
{ "pile_set_name": "StackExchange" }
Q: Objects are not valid as a React child (found: [object Promise]). If you meant to render a collection of children, use an array instead I am trying to import data from a json file and render a list of images. But I get an error saying: Objects are not valid as a React child (found: [object Promise]). If you meant ...
{ "pile_set_name": "StackExchange" }
Q: Algorithm for N-way merge A 2-way merge is widely studied as a part of Mergesort algorithm. But I am interested to find out the best way one can perform an N-way merge? Lets say, I have N files which have sorted 1 million integers each. I have to merge them into 1 single file which will have those 100 million sort...
{ "pile_set_name": "StackExchange" }
Q: Finding new memory address? C++ (I tested the address because I was getting errors and I found out the address changed before it was deleted, by the time the delete is called the titlePTR has already changed its address and it is giving me an error saying "BLOCK TYPE IS VALID" I heard this is when you try to delet...
{ "pile_set_name": "StackExchange" }
Q: Finding an item's index in an array I was writing a function that takes two arguments, an array and a number, and returns the index of the number if it's present in the array. The issue I encounter is the fact that my code returns properly without the "else" part, however, when I add the code about returning "-1" ...
{ "pile_set_name": "StackExchange" }
Q: How to extrapolate variables to make them become globals? Let's say I have to find out the window width, the code will be: $(window).width(); and if I want it to become a global variable i just have to declare its name: var windowWidth = $(window).width(); The result will be the window's width. But I need that v...
{ "pile_set_name": "StackExchange" }
Q: Frameless window with controls in electron (Windows) I want my app to have no title bar but still be closeable, draggable, minimizable, maximizable and resizable like a regular window. I can do this in OS X since there is a titleBarStyle option called hidden-inset that I can use but unfortunately it's not availab...
{ "pile_set_name": "StackExchange" }
Q: Problema Funcion SQL Error: not allowed to return a result set from a function no veo para nada el problema de esta función, intento validar el pin de un usuario, pero me sale este error, he estado mirando en otras preguntas pero no veo el problema. Les dejo el código aquí abajo: CREATE DEFINER=`root`@`localhost` ...
{ "pile_set_name": "StackExchange" }
Q: What does "All examples have been tested directly from the text, which is in machine-readable form" mean? I am reading the classic book on C - The C Programming Language Book by Brian Kernighan and Dennis Ritchie. The preface of the book says All examples have been tested directly from the text, which is in machi...
{ "pile_set_name": "StackExchange" }
Q: How can I chain cases in Bash 3.2, which doesn't have `;&`? I have a bash script that resumes aborted execution with a case statement. It works great with Bash 4 under CentOS 6 but does not work with CentOS 5 because of Bash 3.2. Is there any programming logic I can use to replace the following with something more...
{ "pile_set_name": "StackExchange" }
Q: Django Rest Framework, display data from a table referenced with a foreign key I got stuck a bit with a small problem when doing my school project, the problem is that I have an api with DRF and wanting to show my patient data "main table" shows them without problems but when I want to show other patient data in a...
{ "pile_set_name": "StackExchange" }
Q: Send data from Telerik Grid to new tab/page on button click I have a Telerik Grid as below ( I'm relatively new to MVC and brand new to Telerik controls). The grid is a partial view that gets updated from a list of search criteria. @(Html.Kendo().Grid((IEnumerable<MyModel>)Model.MyModel) .Name("grid") .Da...
{ "pile_set_name": "StackExchange" }
Q: Read from Kafka and write to hdfs in parquet I am new to the BigData eco system and kind of getting started. I have read several articles about reading a kafka topic using spark streaming but would like to know if it is possible to read from kafka using a spark job instead of streaming ? If yes, could you guys hel...
{ "pile_set_name": "StackExchange" }
Q: How to start osgi console (Equinox) I'm trying to start an OSGi console in Windows 7. I used this statement on a terminal window: java -jar org.eclipse.osgi.jar -console But it doesn't work that is nothing does happen nor doesn't appear prompt osgi>. And typing on keyboard is ineffective except for ^C that makes...
{ "pile_set_name": "StackExchange" }
Q: Using PyQt5, How do I make a QComboBox searchable? I am using PyQt5 to make a GUI. On it, I have a QComboBox that has a dropdown list that has over 400 items. I was wondering if there is any way in which I can type into the QComboBox to search for a matching case? A: You could use a QCompleter for this. For an ...
{ "pile_set_name": "StackExchange" }
Q: passing data parameters to updata SQL table A user enters in his information via 8 JTextFields. This information is passed via parameters into the updateUser method and the method updates the SQL table with this information. This is what I am currently trying to do although when User presses update button, no chan...
{ "pile_set_name": "StackExchange" }
Q: Text Scrolling in java Pleae help to solve this problem... I has a page designed in JFrames Now i need to make a text scrolling at the top of the page.... Please provide me the code... A: Check this out, is is commented and will most likely help you. http://www.abbeyworkshop.com/howto/java/ta_scroll/index.html
{ "pile_set_name": "StackExchange" }
Q: Issue of convertHtml data missing Have you guys faced the data loss after converted HTML to pdf? Here is my problem. $scope.current.clause_note = '<ul><li>This is for testing <strong>TINTERIOR WORKS</strong></li></ul><p><br></p>' $scope.current.clause_note = self.convertHtml($scope.current.clause_note); The resu...
{ "pile_set_name": "StackExchange" }
Q: Android Bulk insert Or Update rather then insertOrReplace My Problem: I m working on an Android application (using SQLite) where I have to fetch a lot of data from a server and store it to DB. Currently, I m getting a list from the server, Loop over it and inserting it into DB one by one. But before every record ...
{ "pile_set_name": "StackExchange" }
Q: Understanding undefined behavior for a binary stream using fseek(file, 0, SEEK_END) with a file The C spec has an interesting footnote (#268 C11dr §7.21.3 9) "Setting the file position indicator to end-of-file, as with fseek(file, 0, SEEK_END), has undefined behavior for a binary stream (because of possible trail...
{ "pile_set_name": "StackExchange" }
Q: How to power a device using a USB port instead of AA batteries? I have a device that uses 3 AA batteries and I would like to power it from a USB port instead. As I understand I will have to use resistors but I have no idea on which ones. I have found the following calculator: Voltage Divider Calculator While it do...
{ "pile_set_name": "StackExchange" }
Q: How to auto resize contents in CollectionViewCell after the cell's size changed? In Xcode, I created a UICollectionView and dragged some labels to the UICollectionViewCell. The issue was that when changing devices, the cell won't adjust its size to the screen size. So I implemented the following code: func collect...
{ "pile_set_name": "StackExchange" }
Q: Applying Button+Macro across all worksheets Forgive my ignorance (newby and little knowledge of VBA)... I have developed some macros that are attached to buttons, and working in one worksheet in a workbook. The macros perform various jobs on a calendar. There is one calendar for each of 10 bedrooms in the wing of ...
{ "pile_set_name": "StackExchange" }
Q: Multiple ColladaLoader loads fail. Is it thread safe? I am trying to load multiple pieces simultaneously. Either only one piece shows up, correctly, or both pieces show up, with one correct and one incorrect. Here's my code: var loader = THREE.ColladaLoader(); loader.load('model.dae', function colladaReady(result...
{ "pile_set_name": "StackExchange" }
Q: Chrome extension : jQuery.js conflicts in background file conflics with plugins in websites I am including jQuery in background_page like this, <script type="text/javascript" src="libs/jquery.js"></script> Here's the problem: In websites, where jQuery plugins are used (with jQuery.extend method), they do not wor...
{ "pile_set_name": "StackExchange" }
Q: In The Dark Knight, what happened to all the bank robbers? The opening scene of The Dark Knight shows a bank robbery being perpetrated by a gang hired by the Joker. It transpires that they are all supposed to kill each other, with presumably each of them thinking he will be the only one left to split the takings w...
{ "pile_set_name": "StackExchange" }
Q: Facebook: How to get fanpage by domain search? I would love to get the Facebook fanpage for a domain with the Facebook Graph search. I tried the following, but only got a random id but not the pages id? https://graph.facebook.com/?domain=stackoverflow.com Question: How to get the Facebook Pages Name or ID when i o...
{ "pile_set_name": "StackExchange" }
Q: Disable super + s in ubuntu 13.04 I tried this thread but it didn't work. How can I disable super + s which previews workspaces A: You can use CompizConfig to do this. (sudo apt-get install compizconfig-settings-manager in a terminal to install if it isn't on your computer already) To open, type "CompizConfig" ...
{ "pile_set_name": "StackExchange" }
Q: Audio file does not persist in Cordova with LocalFileSystem.PERSISTENT I have been trying to store Audio file in persistent storage for two days without success. So far I am able to create an audio file which records audio from Microphone (The app has the permission) using the code attached below. The audio file ...
{ "pile_set_name": "StackExchange" }
Q: Need a bootable OS X installer iso I removed the OS X partition off my HDD and installed Ubuntu. Now I want OS X back but I can't install it considering I have no access to Mac OS X. I need either an OS X Snow Leopard or OS X Lion .iso so I can put it on an installer USB. A: Since OS X Lion was around $30 USD on...
{ "pile_set_name": "StackExchange" }
Q: Code is HttpClient or servlet API to parse Cookie header Is there any existing code in Apache HttpClient or in the servlet API to parse Cookie header and obtain from a string that contains "name1=value1; name2=value2; ..." a list of Cookie? Writing code to parse this doesn't seem too hard, but if there is already ...
{ "pile_set_name": "StackExchange" }
Q: Problem with vertical alignment in tabular environment I'm having a few issues with vertically aligning table elements. There seems to be too much space either above or below the text or image. Is this to do with the fbox environment? I want both the image and text to be centered vertically in each table cell. \do...
{ "pile_set_name": "StackExchange" }
Q: Android get all assets folder images How to retrive all images from folder named 'imagesf' in assets folder and using it as int[] instead of int[] mImages = new int[]{ R.drawable.pic1 ,R.drawable.pic2 ,R.drawable.pic3 ,R.drawable.pic4 }; To use it in a viewpager A: Use below code to get all image name from 'i...
{ "pile_set_name": "StackExchange" }
Q: Scroll for checkboxlist doesn't work I have this CheckBoxList : <asp:CheckBoxList class="checkBoxList" ID="CheckBoxList1" runat="server" TextAlign="Right" float="right" > and this css: .checkBoxList { direction:rtl; float:right; text-align:right; width:100%; height:200px%; ov...
{ "pile_set_name": "StackExchange" }
Q: Combining Nodejs Net socket and Socket IO I have a windows application (Built on C# as windows service) that sends data to NodeJs Net Socket, So since Socket.IO helps making a Web Application a live one , without the need of reload. How can i allow Socket.IO stream the received data from NodeJs Net Socket to the W...
{ "pile_set_name": "StackExchange" }
Q: Testing GestureDetector on Image widget I have made a simple test case app where you click a widget using GestureDetector which triggers an update using setState to the tapCount variable. The app is working in the emulator with the text updating correctly as shown above, but as soon as I try a Flutter widget test,...
{ "pile_set_name": "StackExchange" }
Q: Split a dataset into a list of dataframes with equal number of columns I have a data set with 36 columns and single observation. I want to split it into a list with each dataframe having 3 columns and then rbind them into a single data frame. I have been using the following code: m=12 nc<-ncol(df) df1<-lapply(spli...
{ "pile_set_name": "StackExchange" }
Q: php / mysql / javascript mindate and maxdate In .net, there are the static properties DateTime.MinDate, and DateTime.MaxDate that conveniently return the minimum and maximum valid dates for a DateTime object. I'm dabbling in web programming right now, using php + mysql + javascript. There doesn't seem to be the sa...
{ "pile_set_name": "StackExchange" }
Q: Is there a way to go up a certain number of directories depending on the current location? I'm trying to implement Jekyll to my site and I'm having a hard time setting paths for my images since I don't know how to allot for the different paths since the permalink to each post is one folder deeper than the homepage...
{ "pile_set_name": "StackExchange" }
Q: How can I get any expression in C# as string? In many cases one needs the name of an expression, parameter, statement, etc. For example: public abstract void Log(string methodName, string parameterName, string message); public void FooMethod(string value) { if (value == null) { this.Log("FooMethod...
{ "pile_set_name": "StackExchange" }
Q: N1ql -> IN operator does not work with other conditions The following query works just fine when only IN operator is used SELECT META().id FROM bucket_name WHERE description IN ['Item1','Item2'] But when I fire this query it gives me a blank result SELECT META().id FROM bucket_name WHERE id = 123 AND description I...
{ "pile_set_name": "StackExchange" }
Q: If Wolverine broke a bone which protruded his skin, what would happen if he started to heal before it was set and splinted? In X-Men Origins: Wolverine we see that Wolverine’s bones can be broken in the fight between him and Sabretooth. So if he was to suffer an injury (let's say a very high fall) and broke his le...
{ "pile_set_name": "StackExchange" }
Q: Does a "body-only" DSLR need a lens added before use? What does it mean for a DSLR camera to be described as "body-only"? I found one advertised for sale that was described as such, and I don't know if I'll need to add a lens. I assume that it means either that the camera is used without attaching an external le...
{ "pile_set_name": "StackExchange" }
Q: Angular4 Exclude Property from dirty check I've implemented a custom form control via template driven forms which wraps an input in html and adds a label, etc. It talks to the form just fine with the 2way data binding on the ngModel. The problem is, the form is automatically marked as dirty when it is initialized....
{ "pile_set_name": "StackExchange" }
Q: How do I convince my colleagues not to implement IDisposable on everything? I work on a project where there is a huge number of objects being instanced by a few classes that stay in memory for the lifetime of the application. There are a lot of memory leaks being caused with OutOfMemoryExceptions being thrown ever...
{ "pile_set_name": "StackExchange" }
Q: NSTextCheckingResult for phone numbers Can someone tell me why this evaluates every time to true?! The input is: jkhkjhkj. It doesn't matter what I type into the phone field. It's every time true... NSRange range = NSMakeRange (0, [phone length]); NSTextCheckingResult *match = [NSTextCheckingResult phoneNumber...
{ "pile_set_name": "StackExchange" }
Q: Active Directory not replicating I have a windows server 2003 as a PDC ("server 1"). I am attempting to take it offline once I get several issues cleared up. I have two other windows server 2008 servers that have been promoted as DC's ("server 2" and "server 3"). When I run dcdiag on any of the servers I get fail...
{ "pile_set_name": "StackExchange" }
Q: How to strip column values in Active record through loop before saving in rails framework? I have to remove spaces for every record before saving into the database. I can do that by specifying it for each column, but when there 100 columns in each record, it is a pain and no of lines of code increases enormously. ...
{ "pile_set_name": "StackExchange" }
Q: Why is the Django decimal max_digits validation failing with strange behaviour? I have a model field full_time_equivalent: full_time_equivalent = models.DecimalField( max_digits=5, decimal_places=2, default=100, validators=[ MinValueValidator(Decimal(0)), MaxValueValidator(Decimal(1...
{ "pile_set_name": "StackExchange" }