text
stringlengths
181
35.5k
meta
dict
Q: Creating "cylinder with bottom" node shape in TikZ/PGF How to create custom TikZ node "cylinder with bottom", where hidden line in cylinder bottom is shown using dashed line. Something like the following creation, except node center should be in the middle of cylinder (as if it was in the middle of the center of 3...
{ "pile_set_name": "StackExchange" }
Q: What does the "lock" instruction mean in x86 assembly? I saw some x86 assembly in Qt's source: q_atomic_increment: movl 4(%esp), %ecx lock incl (%ecx) mov $0,%eax setne %al ret .align 4,0x90 .type q_atomic_increment,@function .size q_atomic_increment,.-q_atomic_increment Fr...
{ "pile_set_name": "StackExchange" }
Q: Is there have analog for HtmlTableRow in .NET Core I'm porting app from .NET to .NET Core and can't find analog for HtmlTableRow class Error CS0246 The type or namespace name 'HtmlTableRow' could not be found (are you missing a using directive or an assembly reference?) A: This is part of WebForms, which is n...
{ "pile_set_name": "StackExchange" }
Q: Difference between ionic and cordova plugin install When working with ionic, what is the difference between ionic plugin install ... and cordova plugin install Which one should be used? And why? Thx! A: There is a difference Ionic create some files in the project, such as ionic.project and package.json. Each ...
{ "pile_set_name": "StackExchange" }
Q: Suddenly Springfox Swagger 3.0 is not working with spring webflux Application was working with Springfox Swagger 3.0 few days back. Suddenly it is stopped working. The Jar file which was created before a week is still working but now when we try to build a new Jar file, which is not working, even without any code/...
{ "pile_set_name": "StackExchange" }
Q: Transport-level vs message-level security I'm reading a book on WCF and author debates about pros of using message-level security over using transport-level security. Anyways, I can't find any logic in author's arguments One limitation of transport security is that it relies on every “step” and participant i...
{ "pile_set_name": "StackExchange" }
Q: Getting undefined variable using isset Using the following code, I'm getting the error "Undefined Index: area" <select id="area" name="area" class="selectbox dropdownfilter" data-target-id="location"> <option value="">all areas</option> <?php asort($areas) ?> <?php foreach ($areas as $code =>$area) : ...
{ "pile_set_name": "StackExchange" }
Q: Create string from regular expression PHP I'm trying to create a string from a regular expression. I noticed that in Kohana framework's routing system you can set a route using something similar to a regular expression. Then you can create an url matching a route you've set. I'm trying to do something similar, but...
{ "pile_set_name": "StackExchange" }
Q: Ruby PATH Aptana Setup/Error Watir-Webdriver Well, I'm slow... I can't figure out how to change the PATH for Ruby in Aptana (plugin Eclipse). The Apatana website doesn't offer any "how to". And various searches have ended up no where. Here's the error I'm getting. /home/cmcintyre/.rvm/rubies/ruby-1.9.3-p385/l...
{ "pile_set_name": "StackExchange" }
Q: CSS List with column padding I have created an unordered list with three columns. The columns touch when going responsive and shrinking the resolution. What can I use to give somesort of padding between them? .li-3col { -webkit-column-count: 3; -moz-column-count: 3; column-count: 3; } A: Try using ...
{ "pile_set_name": "StackExchange" }
Q: restangular save ignores changes to restangular object I'm trying to call save on a restangularized object, but the save method is completely ignoring any changes made to the object, it seems to have bound the original unmodified object. When I run this in the debugger I see that when my saveSkill method (see belo...
{ "pile_set_name": "StackExchange" }
Q: Purchasing a house with parent-in-law's money, temporarily Say I am about to purchase a £200,000 house (moving house, rather than first-time buyer), and can get a mortgage for the £120,000 difference I need. But, my parents-in-law have offered to loan us the £120,000 at 0% interest instead; and we would pay them b...
{ "pile_set_name": "StackExchange" }
Q: Email says it is from nobody I have recently tried to use the php mail function to send out confirmation emails and I have been successful in doing so. However, when I added a few things to my script, something doesn't seem to work. The code below is the code that I got to work. Everything that I need for the e...
{ "pile_set_name": "StackExchange" }
Q: Create a pager for views output How can I make a pager for views output to limit them at 10 entries? $view = views_get_view('myview', 'default'); $view->override_path = $_GET['q']; $view_output = $view->execute_display('page_1', array($tid)); A: Drupal Views module provides this functionality. You don't need...
{ "pile_set_name": "StackExchange" }
Q: Cloud AMPQ integration with iOS APP I am working on to integrate cloud AMPQ to my iOS app. With RabbitMQ client, unable to make successful communication with the server. I have checked below stack overflow link to make a communication with the server: stack overflow link The sample source shared in above link b...
{ "pile_set_name": "StackExchange" }
Q: Python: Merge two csv files and mark the unmatched both in master and using data I am a bit new to python so sorry if my question is irrelevant. I have two csv files similar to this that I want to match file 1 sa_name ABC DEF ACE ABCD BCD And file 2 rs_name ABCD CDE DEFG ABCDE ABE A...
{ "pile_set_name": "StackExchange" }
Q: TextField doesn't take input after adding 2 decimal positive numbers configuration in whitelistingtextinputformatter keyboardType: TextInputType.number, inputFormatters: [ WhitelistingTextInputFormatter( RegExp("^\s*(?=.*[1-9])\d*(?:\.\d{1,2})...
{ "pile_set_name": "StackExchange" }
Q: Hashing a string value to the interval [0; 1] I need to make hashing of pk values (e.g. 1289359, 345623p, etc.) to the interval [0; 1]. The mapping should be deterministic in order to get the same result every time I run the code (I don't want to use seed numbers). For example, the result of mapping 1289359 might...
{ "pile_set_name": "StackExchange" }
Q: Python 3.7: Utility of Dataclasses and SimpleNameSpace Python 3.7 provides new dataclasses which have predefined special functions. From an overview point, dataclasses and SimpleNameSpace both provide nice data encapsulating facility. @dataclass class MyData: name:str age: int data_1 = MyData(name = 'John...
{ "pile_set_name": "StackExchange" }
Q: Can you use the parameters in a Knockout custom validator inside the message? I have made a custom validator much like the one that can be found here. The intent of my validator is to be generic enough that it can be used in other places. This particular one validates the filetype extensions passed into it, and re...
{ "pile_set_name": "StackExchange" }
Q: cannot restore view pager fragment state i have a view pager with 3 fragments. i use retrofit rest api to populate each of my fragments for the first time. What i would like to achieve is when the user swipes back either in first or third fragment(those 2 fragment are being being destroyed by the view pager) to re...
{ "pile_set_name": "StackExchange" }
Q: Simple Option Menu (C) I am trying to make a simple option menu that is executed within a do- while loop. The menu has 5 different options. I am currently trying to test the the get initial option but when I choose the case 'b' the function does not even execute and the option menu reappears again #include "mathpr...
{ "pile_set_name": "StackExchange" }
Q: How to add seconds to date elements I have a date array. I want to add 20 seconds to each of the elements in the array. I tried for(int i=0i<20;i++) { date1[i]=date1[i].gettime()+20; } This gives a long int value. But what i need is time format result.My question is it possible to add seconds...
{ "pile_set_name": "StackExchange" }
Q: Crosstab / pivot query in Oracle's PL/SQL - iBatis - Extjs and JasperReport I tried to create a pivot table created from a table in Oracle 10g. here is the table structure: CREATE TABLE KOMUNIKA.STOCK_AREA ( PRODUCT_CODE VARCHAR2(20 BYTE) NOT NULL, PRODUCT_NAME VARCHAR2(50 BYTE), AREA_CODE ...
{ "pile_set_name": "StackExchange" }
Q: How do I add more than 2 sprites into an animation in pygame? #Importing the pygame functions import pygame import sys import os from pygame.locals import * #Allows for the editing of a window pygame.init() #Sets screen size window = pygame.display.set_mode((800,600),0,32) #Names the window pygame.display.set_...
{ "pile_set_name": "StackExchange" }
Q: How to assume an AWS role from another AWS role? I have two AWS account - lets say A and B. In account B, I have a role defined that allow access to another role from account A. Lets call it Role-B { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aw...
{ "pile_set_name": "StackExchange" }
Q: Method in Java interface that returns class or subclass type I have an interface: public interface Displayable { public Class <Screen> classToDisplay(); } and some classes: public class Screen { } public class ScreenSubclass extends Screen { } public class Cue implements Displayable { @Override displ...
{ "pile_set_name": "StackExchange" }
Q: Sum of dependent normal random variables Let ${\bf X} =(X_1,\ldots,X_n)'$ be a vector of random variables that may be dependent and let ${\bf a}=(a_1,\ldots,a_n)'$ and ${\bf b}=(b_1,\ldots,b_n)'$ be nonrandom vectors with $a_i \neq 0$ and $b_i \neq 0$ for $i=1,\ldots,n$. Assume $ {\bf a' \bf X} =\sum_{i=1}^n a_i ...
{ "pile_set_name": "StackExchange" }
Q: Derivation, composition, constructors, interfaces and TDD When developing TDD your objects 'grow' as code evolves . First they include only some functionalities, and later you add new ones. You can basically do it with composition and/or inheritance. At the same time, you almost always use interfaces (for test, an...
{ "pile_set_name": "StackExchange" }
Q: Proving $n!n^s=o(n^n)$ I want to prove that for any $s\geq0$, and $n\to\infty$, $n!n^s=o(n^n)$ or $$\lim_\limits{n\to\infty}\frac{n!n^s}{n^n}=0.$$ As a hint, the inequality $$\sum\limits_{k=1}^{n}\log k\leq n\log\frac{n+1}2$$ is given. I thought that instead of proving $\lim_\limits{n\to\infty}n!n^{s-n}=0$, one co...
{ "pile_set_name": "StackExchange" }
Q: PHP Xpath simple search I'm trying to add two conditions to a search on my XML. Consider this XML: <?xml version="1.0"?> <votes> <vote> <url>http://www.mydoamin.com</url> <ip>xxx.xxx.xxx.xxx</ip> </vote> </votes> Then I use: $xml->xpath("(//votes/vote/[url='Admin' and ip='Group']"); But that give an...
{ "pile_set_name": "StackExchange" }
Q: Java hashset vs Arrays.sort I am trying to solve the below 'codility' exercise: A zero-indexed array A consisting of N different integers is given. The array contains integers in the range [1..(N + 1)], which means that exactly one element is missing. Your goal is to find that missing element. Write a function: cl...
{ "pile_set_name": "StackExchange" }
Q: Using ScheduledExecutorService, How to Start a Thread without waiting for other thread to complete at fixed interval? I want to run a task at every particular interval of time regardless of completion of previous thread. And I've used ScheduledExecutorService with the schedule time at every one second. But the pro...
{ "pile_set_name": "StackExchange" }
Q: Соединить две окружности. В чём ошибка? Пытаюсь повторить полигон, тот что изображен зеленой линией на рисунке ниже. Пользовался этими советами: Совет первый Совет второй Оба дают результат с некоторым смещением вдоль окружностей. Помогите, пожалуйста, в чем моя ошибка. Jsfiddle проект Писал на JS, но подойдёт л...
{ "pile_set_name": "StackExchange" }
Q: Email hacking/masking prevention Can someone please explain to me how its possible that someone hacks a server and uses its email to send emails from a address thats not listed on the server and how to prevent it. When I look at the mail queue there are emails there from and to yahoo.com accounts, how does this ha...
{ "pile_set_name": "StackExchange" }
Q: Create an event for tab pages in C# I am developing an application in C# Windows Forms, and I would like to create an event handler/event handlers based on whether or not a particular tab page of a tab control is selected. So for example, if I have three tab pages: tabPage1, tabPage2, tabPage3, which belong to ...
{ "pile_set_name": "StackExchange" }
Q: double click on mvc 4 web grid I am preparing a mvc 4 application and I am pretty new to it. I would like to implement a functionality like by double clicking a row of mvc 4 webgrid I should call an action method in ajax. But unfortunately I could not find how to implement double click on mvc 4 web grid. Can you p...
{ "pile_set_name": "StackExchange" }
Q: OpenMesh: remove_property : is not a member of Decimater::DecimaterT I'm trying to use the decimater algorithm in OpenMesh. I followed the basic setup presented in this link: http://openmesh.org/Documentation/OpenMesh-2.0-Documentation/decimater_docu.html but I get the following error which is comes from the modqu...
{ "pile_set_name": "StackExchange" }
Q: Best way to reorganize array of objects I need reorganize and array of linked objects by id to only one tree object. The depth level is unknown, so that I think that it should be done recursively. What is the most efficient way? I have the next array of objects: const arrObj = [ { "id": 1, "children": [ ...
{ "pile_set_name": "StackExchange" }
Q: how to read cookies in jquery? I am creating a cookie with a key and value of an object using carhartl’s jQuery cookie plugin,In one of my method I call create cookie and right after that I call get cookie;but the read method doesn't work: makeCookie methode: function makeCookie(name,value){ $.cookie(name,valu...
{ "pile_set_name": "StackExchange" }
Q: Synchronized statement, unclear java doc example Currently I am trying to understand synchronized in Java getting to this java doc example under synchronized statements the example with the class MsLunch and the two instance variables c1 and c2. It states: Suppose, for example, class MsLunch has two instance fie...
{ "pile_set_name": "StackExchange" }
Q: Looking for up-to-date F# PowerPack Is there someone who working on F# Power Pack ? Seriously - last update is Dec10 for old F# Core. So I've got own rebuild for some parts (Linq2sql) for .net4 and new core and I think there is someone else who got the same and someone who is working on it - where can I find it ? ...
{ "pile_set_name": "StackExchange" }
Q: Unity Sprite Editor: Can You Preview A Background Image While Setting Pivot? I've Googled around a lot, and I checked the Unity Asset store but I cannot seem to find what I think is a common problem (or perhaps I'm doing it wrong). The issue is when I use the Sprite Editor I cannot see a reference image which is u...
{ "pile_set_name": "StackExchange" }
Q: Trouble updating a UIImageView selected from iphone photo library I'm using the code below to retrieve an image from the iphone photo library. self.selectedImageView.image is an image view located on top of the view of the current view controller. Everything in xcode seems linked correctly; the image view is wired...
{ "pile_set_name": "StackExchange" }
Q: How can I export content-type and content from one site to another? I got handed over a drupal 7 site with two branches, one is now in production and other is dev. I am working on dev and had to create new content types and made changes existing content types. In the meantime other users made some changes to con...
{ "pile_set_name": "StackExchange" }
Q: I want a shadow on the floor for all my objects in SWIFT / Scenekit I'm working on an ARKit project in swift. In SWIFT I add objects to the scene. What I want to do with those objects is show a shadow beneath them to make them more realistic. I tried some things and those all didn't work. I'll explain that here. P...
{ "pile_set_name": "StackExchange" }
Q: Haskell if then else with "two statements" How can I do this: if n > 0 then putStrLn "Hello" putStrLn "Anything" I want to have "two statements" in one condition but I keep getting compilation errors I tried using semi-colon with no luck A: then can only take one value.... But you are in luck, because do ...
{ "pile_set_name": "StackExchange" }
Q: How to set previous value when cancelling a drop-down list with Angular Directive? I have an angular directive that you add to any 'select' element to give it a cool modal pop up and add a custom message (which I omitted from this example). I'm trying, in the directive, to make it so when the user clicks cancel th...
{ "pile_set_name": "StackExchange" }
Q: Get MySQL Path Columns of Subpages Into Hierarchical Array And Output To Tiered I have a MySQL table with content for a custom CMS I've built. There are a number of columns, but the ones dealing with the paths are: path (full path to the page, e.g. /category/page1/ ) parentpath (path up to that particular page, ...
{ "pile_set_name": "StackExchange" }
Q: Manually Start Ubuntu One Daemon I would like to be able to manually start and stop the Ubuntu One Daemon. However, I need to know: What is the name of the ubuntu one daemon ? Can I use update-rc.d (ubuntu one daemon) disable & to manually start it? Any help will be greatly appreciated. Updated Remove It From A...
{ "pile_set_name": "StackExchange" }
Q: Download a zip archive and extract one file from it I wrote a function that downloads a file https://www.ohjelmointiputka.net/tiedostot/junar.zip if it not already downloaded, unzips it and returns the content of junar1.in found in this zip. I have PEP8 complaints about the length of lines that I would like to fix...
{ "pile_set_name": "StackExchange" }
Q: jQuery clone with radio I have trouble to $_POST radio and radio selection if i use jquery clone method. Below code i have Gender selection. If user can click on add-more link clone gender and append to same form. HTML <form action="test.php" method="post"> <div id="one"> <input type="radio" name="gender" valu...
{ "pile_set_name": "StackExchange" }
Q: Angular2 Testing: Service returning function instead of object array I want to write some tests for my service written in Angular 2.1.0: @Injectable() export class MyService { api_base_url = 'http://' + environment.apiHost + ':5000/api/'; constructor(private http: Http) { } getMyObjs(query): Obse...
{ "pile_set_name": "StackExchange" }
Q: AngularJS select change trigger I am trying to do a script that will copy the value of one select tag model to another and then trigger its ng-change function using a checkbox. What happens is when you click the checkbox, it does copy the value but the trigger does not work anymore. Seems like there is a conflict ...
{ "pile_set_name": "StackExchange" }
Q: Golang: Issues replacing newlines in a string from a text file I've been trying to have a File be read, which will then put the read material into a string. Then the string will get split by line into multiple strings: absPath, _ := filepath.Abs("../Go/input.txt") data, err := ioutil.ReadFile(absPath) if err != ni...
{ "pile_set_name": "StackExchange" }
Q: Should I provide login functionality in mobile version? I am working on a mobile version of the new website for my company, if users visit my website on a mobile device/tablet, they will be asked whether the visitor wants to go to the mobile version or the normal version. But on the normal version I have login fun...
{ "pile_set_name": "StackExchange" }
Q: combineReducers is overwriting state instead of setting up different states I'm trying to learn Redux. I have this action which fetches data: export const FETCH_SUCCESS = "FETCH_SUCCESS"; import axios from "axios"; export const fetchData = () => { return async dispatch => { try { const result = await ...
{ "pile_set_name": "StackExchange" }
Q: Get iOS ID not FCM Id in Ionic 2 with Phonegap Push Plugin I'm developing app in Ionic 2. I installed phonegap push plugin https://github.com/phonegap/phonegap-plugin-push to get notifications and get device ID. When I'm in Android App the device ID of return is a GCM ID, but when I'm in iOS he return FCM Id, and ...
{ "pile_set_name": "StackExchange" }
Q: How to get the primary route, if it doesn't exist and we are being sent to 404 page So basically I am trying to debug my routes, because they are not working as intended, but when using the profiler, I can see the URI string, which is basically the second part of URL in the browser address bar and CLASS/METHOD whi...
{ "pile_set_name": "StackExchange" }
Q: why the height of the out div is affected by vertical-align in chrome, I thought the height of .wrap should be 24px. it is 25px when the vertial-align is set to middle. can someone explain why? answer in this article body { line-height: 1.5; } .wrap { font-size:16px; /* 16*1.5= 24 */ } .btn { f...
{ "pile_set_name": "StackExchange" }
Q: Плавающий блок с position:fixed На пальцах объяснить трудно, вот пикча, того что я хочу сделать: Зеленые блоки это блоки с position:fixed; Красные полоски - границы экрана; Желтые блоки - это области в которых из которых не могут выйти зеленые блоки. Если листать выше или ниже, то зеленые блоки остают...
{ "pile_set_name": "StackExchange" }
Q: How do cursors work in Python's DB-API? I have been using python with RDBMS' (MySQL and PostgreSQL), and I have noticed that I really do not understand how to use a cursor. Usually, one have his script connect to the DB via a client DB-API (like psycopg2 or MySQLdb): connection = psycopg2.connect(host='otherhost',...
{ "pile_set_name": "StackExchange" }
Q: Pass method calls to object I am trying to create a custom swipe gesture recognizer to set allowed angles and distances. So far it works really well but needs a lot of code in the view controller. So my question is wether it is possible to somehow pass a method call like: - (void)touchesBegan:(NSSet *)touches with...
{ "pile_set_name": "StackExchange" }
Q: Infima and Inequalities This is a question about "taking the inf" that is done everywhere in analysis. I give one example here to make my question more concrete. In the proof that the Lebesgue outer measure of intervals is equal to the length of the interval $[a,b]$, we take any cover of intervals $\{I_n\}$ and sh...
{ "pile_set_name": "StackExchange" }
Q: Python df.loc not working for variables I am fairly new to Python, especially pandas. I have a dataframe called KeyRow which is from a bigger df: KeyRow=df.loc[df['Order'] == UniqueOrderName[i]] Then I make a nested loop for i in range (0,len(PersonNum)): print(KeyRow.loc[KeyRow['Aisle'] == '6', 'FixedPill']) ...
{ "pile_set_name": "StackExchange" }
Q: Describe or link to a simple method of solving set theory questions I have a series of set theory questions to answer and the method I have is to draw out venn diagrams one by one and work them out visually. I have been unsuccessful in my search for 3 set arithmetic questions. Is there a simpler general method or ...
{ "pile_set_name": "StackExchange" }
Q: Finding kernel and image of a linear transformation, given eigenvalues and eigenvectors? Problem: Consider the linear transformation $T : \mathbb{R}^3 \rightarrow \mathbb{R}^3$ with eigenvalues $-1, 0$ and $1$ and the corresponding eigenvectors $v_1, v_2, v_3$. Determine $\text{ker}(T)$ and $\text{Im}(T)$. Attempt...
{ "pile_set_name": "StackExchange" }
Q: ERROR: Error installing jekyll: ERROR: Failed to build gem native extension My system has: ruby 2.0.0p451 (2014-02-24) [x64-mingw32] gem -version 2.2.2 devKit : DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe When I try to run gem install jekyll, I get this error: D:\devKit>gem install jekyll Temporarily enhancing...
{ "pile_set_name": "StackExchange" }
Q: Join table on Count I have two tables in Access, one containing IDs (not unique) and some Name and one containing IDs (not unique) and Location. I would like to return a third table that contains only the IDs of the elements that appear more than 1 time in either Names or Location. Table 1 ID Name 1 Max 1 ...
{ "pile_set_name": "StackExchange" }
Q: ggplot : Multi variable (multiple continuous variable) plotting A data that is deduced from a larger data using dplyr, shows me information regarding the total sales of the four quarters for the years 2013 and 2014. Quarter X2013 X2014 Total.Result 1 Qtr 1 77282.13 66421.10 143703.2 2 Qt...
{ "pile_set_name": "StackExchange" }
Q: JS url encoding when trying to encode the URL http://www.example.com/events/tours/example-tour/?utm_source=example&utm_medium=banner it gives me back the following: http%3A%2F%2Fwww.example.com%2Fevents%2Ftours%2Fexample-tour%2F%3Futm_source%3Dexample%26utm_medium%3Dbanner%20 which does not represent a valid...
{ "pile_set_name": "StackExchange" }
Q: Why is Android Studio generating duplicate gradle dependency automatically? I am using Android Studio 2.3.3 on Windows 10. I already have these in my dependencies: compile 'com.android.support:recyclerview-v7:25.4.0' compile 'com.android.support:cardview-v7:25.4.0' compile 'com.android.support:customtabs:25.4.0' c...
{ "pile_set_name": "StackExchange" }
Q: Sorting out 2 UIalertview's button clicks I have 2 alerts on the same page. Problem is that the clickedButtonAtIndex is answering both alerts and not just the second one. How do I separate them? UIAlertView *passwordAlert = [[UIAlertView alloc] initWithTitle:@"Phone Number" message:@"\n\n\n" ...
{ "pile_set_name": "StackExchange" }
Q: Any way to check for un-handled errors in a Go program? Consider the following: package main import ( "errors" "fmt" ) func foo() error { return errors.New("Danger!") } func main() { foo(); fmt.Println("I don't have a care in the world!") } It would be nice if there was an easy way to see t...
{ "pile_set_name": "StackExchange" }
Q: Add a button at the last cell of UITableView I currently have 2 UITableView to filter out 2 category, my category is cat and dog, 1st UITableView that handles cat and 2nd UITableView that handles dog. What i want is to have cat and dog into one UITableview, so the in the UITableView, the first part will be the cat...
{ "pile_set_name": "StackExchange" }
Q: Running Build-Heap Algorithm on given numbers I don't fully understand this build-heap function. Lets assume we have array 3, 4, 5, 13, 16, 32. It seems like we swap the parent when it is less than the current A[j] but which number does the loop start with? Maybe somebody can go through 2-3 loops and show how the...
{ "pile_set_name": "StackExchange" }
Q: How does Leia Organa know carbon freezing causes hibernation sickness? In the Star Wars universe, there exists a carbon freezing process that has been used before to transport frozen gas over long distances. In Cloud City, the carbon freezing process is used for the first time to encase a living person in suspend...
{ "pile_set_name": "StackExchange" }
Q: how to create private key + CSR signed by a custom CA I am trying to generate a private key + certificate ... certificate need to be signed by CA. I generate a CA with openssl, key: openssl genrsa -aes256 -passout pass:xxxx -out ca.pass.key 4096 openssl rsa -passin pass:xxxx -in ca.pass.key -out ca.key cert: op...
{ "pile_set_name": "StackExchange" }
Q: iPhone Core Data Lightweight Migration Cocoa error 134130: Can't find model for source store Folks, Lightweight migration is failing for me 100% of the time on this line: [persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:options error:&error] with the ...
{ "pile_set_name": "StackExchange" }
Q: How Can I replace a cursor in sql server 2008 In the last years I have put lot of effort in c# and left sql server a bit . My sql skills could be better. I know cursors are slow etc... I have put together a noddy example that I seem to encounter quite a bit at work. I need to migrate data from one flat table "Cust...
{ "pile_set_name": "StackExchange" }
Q: Elixir + Absinthe + Ecto + Dataloader – filter by multiple fields Using Elixir/Absinthe/Ecto/Dataloader, how do you query/filter a source by multiple fields? Example: Let's say you would want to filter a schema (and dataloader source) named User by two fields, one named is_admin (only true values) and one group_id...
{ "pile_set_name": "StackExchange" }
Q: Term for "find, remove and return an element" in a set? Title says it mostly. I want to add a simple extension method to the base Dictionary class in C#. At first I was going to name it Pop(TKey key), kind of like the Stack method, but it accepts a key to use for lookup. Then I was going to do Take(TKey key), but ...
{ "pile_set_name": "StackExchange" }
Q: PHP group certain results from foreach on array into another array I have an array that looks something like this: $array = array( [0] => FILE-F01-E1-S01.pdf [1] => FILE-F01-E1-S02.pdf [2] => FILE-F01-E1-S03.pdf [3] => FILE-F01-E1-S04.pdf [4]...
{ "pile_set_name": "StackExchange" }
Q: How to call generic method with stronger constraint? namespace Test { #region Not my code public interface IAdditional { } public interface ISome { ISomeOther<T> GetSomeother<T>() where T : class; } public interface ISomeOther<T> where T : class { void DoFoo(T ob...
{ "pile_set_name": "StackExchange" }
Q: MDQueryGetResultAtIndex and UnsafeRawPointer in Swift 3 I'm having trouble exploring the results of a Spotlight search in Swift 3 using MDQuery. I expect MDQueryGetResultAtIndex to yield an MDItem, and in C/Objective-C, that assumption works, and I can call MDItemCopyAttribute on it to explore the item. Here, for ...
{ "pile_set_name": "StackExchange" }
Q: How to create dynamic substring with awk Let say i have file like below. ABC_DEF_G-1_P-249_8.CSV I want to cut to be like this below. ABC_DEF_G-1_P-249_ I use this awk command to do that like below. ls -lrt | grep -i .CSV | tail -1 | awk -F ' ' '{print $8}' | cut -c 1-18 Question is, if the number 1, is growin...
{ "pile_set_name": "StackExchange" }
Q: Really logging the POST request body (instead of "-") with nginx I'm trying to log POST body, and add $request_body to the log_format in http clause, but the access_log command just prints "-" as the body after I send POST request using: curl -d name=xxxx myip/my_location My log_format (in http clause): log_for...
{ "pile_set_name": "StackExchange" }
Q: Axios returns promise pending i want this function to return either true or false, instead I get /** * Sends request to the backend to check if jwt is valid * @returns {boolean} */ const isAuthenticated = () => { const token = localStorage.getItem('jwt'); if(!token) return false; const config =...
{ "pile_set_name": "StackExchange" }
Q: How to say "I look" as in "I look stupid" in French? How do you say "I look" as in "I look pretty/stupid/etc"? Do you use ressemble? Also, out of topic: how do you say "you seem adjective", and how do you express "pretty" as in "That's pretty dumb"? A: "To look" + adjective in French can be said a couple differe...
{ "pile_set_name": "StackExchange" }
Q: How to replace nested functions with class call I need to replace a nested function with a class call. Here is the original code. import numpy as np from variables_3 import vars def kinetics(y,t,b1,b2): v = vars(*y) def dydt(v): return [ (b1 * v.n) + (b2 * v.c1), (b1 * v.n) - (v.c...
{ "pile_set_name": "StackExchange" }
Q: HTML5 video loading time I am trying to calculate the measure time of html 5 video. I use javascript to listen to html5 video event loadstart and canplaythrough using: media.addEventListener('loadstart'getStartTime(){ startTime = new Date().getTime();}, false) and similar for endTime with event set as canplayth...
{ "pile_set_name": "StackExchange" }
Q: How to get the OSM file to generate width of the streets? I'm attempting to load osm data into a database and i've used both osm2p0 and osm2pgrouting and kept realizing I wasnt seeing anything that referenced the width of the streets. This is important for me as I am writing a program to perform search and rescu...
{ "pile_set_name": "StackExchange" }
Q: Renaming items in export menu in highcharts Can someone please suggest if there is anyway we can rename the items in the export menu in highcharts. Currently it has entries like: Download PNG image Download JPEG image ... I want to remove word "image". Moreover want to control the complete styling. A: There ar...
{ "pile_set_name": "StackExchange" }
Q: Q about [42000] and passed by reference I have two errors in my php script, the only weard thing is this is the exact code as my other scripts. thats the reason that i can't find the solutions. Can you help me to find the solution? Strict Standards: Only variables should be passed by reference in /home/joshua/doma...
{ "pile_set_name": "StackExchange" }
Q: Can't connect to web socket react-native-meteor iOS I'm using react-native-meteor, and am having trouble connecting to the web socket with iOS only. My application works just fine when running on the android simulator, but just doesn't work in iOS simulator or device. This is my code: Meteor.connect('ws://app.my...
{ "pile_set_name": "StackExchange" }
Q: JQuery Autocomplete trouble I'm trying to recreate JQUery autocomplete example from its website: http://jqueryui.com/autocomplete/#multiple-remote The only thing I change is I changes the source property from : source: function( request, response ) { $.getJSON( "search.php", { t...
{ "pile_set_name": "StackExchange" }
Q: Can I display a message in MySQL? I have a question related to SQL. Can I display a custom message in MySQL phpMyAdmin, something like this: SELECT * FROM table_name PRINT 'The message that I want to write!'; I tried to do it with PRINT syntax, because I found something like that, but it doesn't work. Do you have...
{ "pile_set_name": "StackExchange" }
Q: Rails nested form, attributes not getting passed So I have a Conversation model, which has_many messages. I'm trying to create a new message when I create a conversation. Here's my ConversationsController: class ConversationsController < ApplicationController before_filter :authenticate_user! def new recip...
{ "pile_set_name": "StackExchange" }
Q: Count Based on 2 date Ranges for 2 different columns Having an issue writing a report. I am trying to count on the number of enquiries Issued and passed, they both have a datetime field The problem im having is the results are coming back incorrect. Running this code gives me 126 for passed SELECT COUNT(*) AS Pas...
{ "pile_set_name": "StackExchange" }
Q: how to change code this into recursion Java? public long weightedSum(int[] a, int[] b, int n) { long value = 0; long sum = 0; for (int i = 0; i < a.length; i++) { value = a[i] * b[i]; sum = sum + value; } return sum; } takes two 1D integer arrays and an integer n as paramete...
{ "pile_set_name": "StackExchange" }