text
stringlengths
70
452k
dataset
stringclasses
2 values
Save JSON in MongoDb with Sails.js What I want to do is to create my DataBase from an external API, firstly I create a function loadData(req, res){} in my DBController, this function loads the data in JSON format from the API. What I want to do now is to save this returned JSON within my mongoDB, I don't know how. How...
common-pile/stackexchange_filtered
Displaying Month Name Instead of Month Number SQL Server I have a select statement where I am pulling the date. Say my date in the table is 2014-12-25, I want this to actually return December 2015. Is there a function that SQL has that can do this in a clean way? Here is my select: select a.[amount] AS 'Amount', a.[Da...
common-pile/stackexchange_filtered
how can i store a string in an array in c? I tried using the strlen to count the characters and named the variable n and created an array with a name [n+1] but the variable n is not a global variable so I'm having some problems as the computer does not understand what n is. To calculate n I created another function #in...
common-pile/stackexchange_filtered
Optimizing Laravel's Eloquent models There are 3 MySQL tables in database: Products: id | name Product prices: product_id | currency_id | price Currencies: id | mark And Laravel's Eloquent models look like this: // Product.php class Product extends Eloquent { protected $table = 'products'; protected $primar...
common-pile/stackexchange_filtered
Map groupBy with multi-sort Going a bit nutty here trying to multi-sort on the following. case class WeeklyResults( schedule: Schedule, result: GameResult ) val games = // returns correctly sorted List of WeeklyResults repo.gameresult.findAllByDate(date) Things go awry when I groupBy on game date (to display gam...
common-pile/stackexchange_filtered
USB Bootloader Dual-Boot My goal: try to install Ubuntu on a separate partition of my laptop's HDD which would only be bootable with an inserted USB drive. This drive would contain GRUB and additional ext4 storage, without it the laptop will boot into w8.1 regularly. My problem: constant installation failure. I've maxe...
common-pile/stackexchange_filtered
「が」(ga) vs 「は」(wa) when it comes to specifically "this" object / referring to self Learning particles and looking at wa vs ga. From what I have seen wa is the topic/general and ga is for the subject/specific. I was watching this video which had the following example: I like Van Gogh's paintings. Gohho no e ga suki des...
common-pile/stackexchange_filtered
Xamarin Forms Error: Default constructor not found for type Xamarin.Forms.ImageSource I have been building on a Xamarin.Forms app and have just now noticed a strange issue in the App.xaml file where I am declaring the global resources in the ResourceDirectory. Even just after removing extra lines of space in the App.xa...
common-pile/stackexchange_filtered
Django Syntax Highlighting within POST form In Django 1.8, I have enabled prism syntax highlighting[1] css / js within head section of my base.html template <link rel="stylesheet" href="{% static 'css/prism.css' %}"> <script src="{% static 'js/prism.js' %}"></script> I have proved this works ok, by pasting in ...
common-pile/stackexchange_filtered
Form validation with React I'm attempting to create a user registration form and running into a roadblock with displaying form validation errors. Problems: 1) The input no longer posts (axios) to the db upon submission for inputs that don't have errors 2) The error message does not go away upon the error being fixed. ...
common-pile/stackexchange_filtered
VB.net Linq Expression from ListItemCollection to List(Of Guid) I want to do something like this: Dim selectedCourses As List(Of Guid) = From item In chkListCourses.Items Where item.Selected = True Select item.Value but I get the error: Unable to cast object of type 'WhereSelectEnumerableIterator2[System.Object,...
common-pile/stackexchange_filtered
How to make the computation faster? Here is short code which computes sum of all square numbers(not actually sum of squares) till n,where n can be upto 10 pow 20. long long res=0; long long sm=0; for (long long i = 1; res <=n; i=i+2) { res = (res+i); sm = sm+(res*(n/res)); } How ...
common-pile/stackexchange_filtered
Using a context bound in a class type parameter I was under the impression that context bounds would work only on methods: trait Target[T] class Post { def pinTo[T : Target](t:T) } apparently context bounds can be used in class too (but not in trait): trait Target[T] class Post[T: Target] { def pintTo[T](t:T) }...
common-pile/stackexchange_filtered
My PHP CURL code quit working on a CSV file after years of working Something changed as my page has worked for years. The function that has the CURL code is called 4 other times to retrieve html pages and works fine. But not long ago it quit working on one call that happens to be a CSV file. Putting the URL in a bro...
common-pile/stackexchange_filtered
Student loan payments and opportunity costs I'm about to graduate college and enter a very well-paid job in an inexpensive area. I am confident that I could repay my student loans much sooner than ten years, but I am wondering whether this is the right approach because there are a number of opportunity costs. To take o...
common-pile/stackexchange_filtered
Emergency Mode and Local Disk I have added this entry to my /etc/fstab /dev/sdb1 /user_data xfs rw 0 0 Which works fine, the issue i am getting it sometime i remove this drive and when i do and reboot my machine it goes into emergency mode. I have tried adding /etc/systemd/system/local-fs.target.d/nofail.conf wit...
common-pile/stackexchange_filtered
How common is the usage of "yous" as a plural of "you"? Yesterday I was exposed to the fact the "yous" is a plural form of the pronoun you. while historically I know that "you" is actually the second person plural pronoun while the singular form is "thou". My question is how common or widespread the use of this form (y...
common-pile/stackexchange_filtered
Recursion flow in c language and how the output is printed How is the value of I getting printed? I know the recursion calls itself again and again. According to me, the function should return empty as the function is called before printing. How is the printf working? recur(int i) { if(i<0) return 0; recur(--i)...
common-pile/stackexchange_filtered
kivy python AsyncImage.reload() with Nocache=True gives remove_from_cache error One of the first experiences with Kivy-Python encounters this situation. The call of self.fullscreen_image.reload() of the inialized class in the constructor: __init__ self.fullscreen_image = AsyncImage(source='http://example.com/1.jpg', ...
common-pile/stackexchange_filtered
Proving that $\rho(x,y) = \frac{d(x,y)}{1+d(x,y)}$ is a metric and that $\rho(x,y)$ and $d(x,y)$ are equivalent metrics As you can see the proof is divided into 2, the first part consists on proving that $\rho(x,y)$ is a metric My attempt i) $\rho(x,y) \geq 0$, which is clear since $d(x,y)$ is a metric, and it is $0$ i...
common-pile/stackexchange_filtered
A counting sort function in C I've tried to implement the counting sort algorithm in C. What efficiencies can you spot? I squint at the end when running through the original array again to assign it the sorted array. Maybe there is a better way? /** * Sorts array of n values. * Using counting sort O(n) */ void sort(in...
common-pile/stackexchange_filtered
How to do page view with cross fade animation I am making a carousel with cross fade animation which I am using AnimatedSwitcher with FadeTransition to achieve such effect. The effect is fine but I want the carousel to be swipeable. I had tried PageView but I do not want the slide animation. Does anyone have any soluti...
common-pile/stackexchange_filtered
Is it possible to merge weak symbols like vtables/typeinfo across RTLD_LOCAL'ly loaded libraries? For context: I have a Java project that is partially implemented with two JNI libraries. For the sake of example, libbar.so depends on libfoo.so. If these were system libraries, System.loadLibrary("bar"); would do the t...
common-pile/stackexchange_filtered
Extracting Data from CSV Files Using PowerShell I've got a syslog server dumping logs from our firewall appliance to CSV files. I'm taking that csv file, and want to pull out certain pieces of data like source and destination IP addresses in the log so I can run further analysis on them later. This is an example of a ...
common-pile/stackexchange_filtered
Proof borel sets are measurable sets Proof that : if $B$ is Borel Set, then $B$ measurable set. I know the definition of measureable sets, for all $A\subseteq \mathbb{R}$, $m^*(A)=m^*(A\cap E)+m^*(A\cap E^C)$, which $m*$ denote the outer measure. I cannot associating with the definition of Borel sets(\sigma algebra con...
common-pile/stackexchange_filtered
How to find the "ordinal hash code" of specified sequence? I have a sequence of [-1,-2,-3,-4,0,1,2,3] and the task is to reach goal sequence of [1,2,3,0,-1,-2,-3,-4]. Symbol "0" means a gap - it could be swapped for a non-gap symbol like this: [-1,-2,-3,-4,1,0,2,3]. At each manipulation with initial sequence the cost i...
common-pile/stackexchange_filtered
Plotly does not work in shiny with HTML function I'm dealing with a quite complicated shiny app in which I would like to create an UI output inside server function. UI is not that easy and depends on many items created on a server side so I'm creating it concatenating HTML parts of UI. Everything works until I meet plo...
common-pile/stackexchange_filtered
How to find the other $\delta$ in a limit? The question is- Let $$ f(x)= x^2 - 5 $$ and $\epsilon>0$ Find $\alpha$ so that $$ |x-4|<Min[5, \alpha] \implies |f(x)-11|< \epsilon$$ Can somebody explain the steps briefly and provide any source to learn about finding $\delta$'s? $ \left|x-4\right| < 5$, so $|x|-|4|\leq|x-4...
common-pile/stackexchange_filtered
Questions about tables in cas-dc-template I want the label and title to be centering, but failed. Now it's like below. Finally, I want this picture to be this one. this is my code. I would be very appreciated if you could help me. \begin{table}[pos=h] \caption{\centering Number of object in DroneVehicle dataset.} \be...
common-pile/stackexchange_filtered
how to code erc20token with minting function for specific amount for every specific interval of time..? say i have "Total_Supply=2750000000tokens",we need to "mint=2150000000tokens" for every day up to 360 days, like to mint 2100tokens for every half'n hour(30 min) totally(100800tokens for every day) what are the funct...
common-pile/stackexchange_filtered
How do I validate entry before input value is set? I'm having a really strange problem. Here's my current Javascript: jQuery('.highlightableTDCell input').keydown(function () { var val = jQuery(this).val(); if (!GridView.prototype.validateStandardCellNumberFormat(val)) { return false; } else ret...
common-pile/stackexchange_filtered
Multithread in NDK on Android5.0 not running? I have created 5 threads in NDK level by using pthread_create(…,…,…). In my Android APP, when it runs on Android 4.4, every single thread's time consuming is 200ms, and total consuming time is also about 200ms. However when the OS is Android 5.0.2 on the same phone, every ...
common-pile/stackexchange_filtered
How to make a button inside a List() that is full width with colored background and clickable? Requirements: - I need to use a list because I'm using it with NavigationLink and I don't wish to code the list logic into a VStack - I need a button that inside a List that has a colored background, like this https://imgur.c...
common-pile/stackexchange_filtered
What close reason to use for "Debug my Website" questions Hi! Here's a link to my website. Something in the HTML/CSS/Javascript isn't working. Can you tell me what? This type of question is obviously not useful, as once a fix has been provided, the website will presumably be updated to incorporate it. And then later ...
common-pile/stackexchange_filtered
how to change the style of GWT checkboxcell? in gwt how do i change the style of checkboxcell? the checkboxcell is inside a gridtable and datagrid.getColumn(0).setCellStyleNames(SomeCssClass.getMyCss()); does not work here's a sample of my code css: .checkBoxCss{ height:25px; } this is for jav...
common-pile/stackexchange_filtered
How to run my Pine Script code where has options so that I can get my list? The code is error free, it does get saved. How can I get my filtered stocks list? I am not able to run it to obtain the results. //@version=5 //@author=YourName // This script scans for stocks whose 44MA and 200MA are both strictly increasing....
common-pile/stackexchange_filtered
Cannot assign regex string in objective-c I'm having issue assigning regex value to a string. Issue that I have is I have \d in the string value and objective-c complaining! Here is my code I'm assigning regex value here. - (BOOL) validateUSZipCode: (NSString *) candidate { NSString *regex = @"^\d{5}(-\d{4})?$"; ...
common-pile/stackexchange_filtered
The prototype keeps failing because we're still thinking about this backwards, Dixon. Everyone focuses on finding materials with natural inversion symmetry breaking. But that's exactly the constraint we need to break free from. The interaction strength scales with the degree of asymmetry and spin-orbit coupling, not j...
sci-datasets/scilogues
NSArray to plist to TableView Thanks in advance. I create an array with 6 parts, each an NSString in one of my views. Each string is taken from a UITextField. I want to make a save button that saves the Array into a plist. I then want a TableView to display a table sorted by the first object in the array, the first str...
common-pile/stackexchange_filtered
Regex to match words, special characters and a date I need a regex for the string which contains in order: alphabets a special character date (dd/mm/yy) e.g. Payments - received by 04/13/13 Could any one help me out on this? I tried the following [a-z]* - [a-z]* 99/99/99 but it is not working. pattern = Pattern.co...
common-pile/stackexchange_filtered
Toast cancel not working, toast are still waiting in queue I found many similar question but none worked for me. fun check(isLeft:Boolean){ val toast:Toast=Toast.makeText(this,"",Toast.LENGTH_SHORT) if(isLeft){ if(left.text.toString().toInt()>right.text.toString().toInt()){ ...
common-pile/stackexchange_filtered
Maven dependency with javadocs 3 Questions: Below are two maven dependencies for JUnit. I have been scouring the interwebs for hours and cannot seem to determine if the second one is Javadoc + code or only Javadoc. Do I need one or both? Further, what is the most effecient way to include Javadocs in a project for devel...
common-pile/stackexchange_filtered
How to cause an error 77 EBADFD in Linux What's a quick shell script, Python script, or C program that can be written to cause it to exit with error code 77 i.e. EBADFD? I don't want to just say for example exit 77, I want it to do something to cause that error to actually be generated. It's not an error, it's a retur...
common-pile/stackexchange_filtered
What average percentage of settlers is required to ensure the supply of food? In a world similar to the earth, a new colony (let's say 1000 settlers) is installed in a wild environment without any other colonies around them (i. e. no commercial routes). The technology advancement is the same as humans around 1000-2000 ...
common-pile/stackexchange_filtered
How to get year,month,quarter from the date in pandas I have a function that takes start date and end date and builds a dataframe off of it. The columns I want in my dataframe are what month it is, what year it is, quater and two more columns. I want to build the year column based on fiscal year. So a new fiscal year i...
common-pile/stackexchange_filtered
Which web server is used by Heroku for Node.js application? Which web server does a Node.js application use when it is deployed on Heroku? It's up to you. Heroku's sample Node.js application uses Express: The application depends on express The index.js script instantiates Express and then listens on the port given by...
common-pile/stackexchange_filtered
mysql Return duplicates and exclude lowest id I am trying list all the rows from my query that will return all the duplicates next to each other so I can then grab their id's but i also want to exclude the id with the lowest number from the results. How can I go about doing that with my query. My Query SELECT a.ta...
common-pile/stackexchange_filtered
How to make cells in data table editable onclick specific row using Quasar? I am using data table component in Quasar. I am able to view table and it’s awesome. here's Now I need to click on a row cell and make it editable input text field, and after pressing ‘Enter’ button I need to save data there itself. How to pro...
common-pile/stackexchange_filtered
I am unable to create user with email and password with firebase I am trying to create user with email and password and then store their details if the task is successful in firebase database for reference purpose but I don't know what happen. The progressDialog keeps loading without creating the user. Here is the code...
common-pile/stackexchange_filtered
Can I use uninsulated ducts and boots for a short circular run through a humidifier? I have a boiler room with outside air inlet so it can get cold/hot in the room, standard drywall stud wall between basement and boiler room. I’m going to install an aprilaire 300 evaporative humidifier with registers into the boiler ro...
common-pile/stackexchange_filtered
Return need exactly same generics sequence I am trying to execute this: public class Value<T extends Number> {} public class Currency<V extends Value> {} public class ValuePair<V extends Value, C extends Currency<V>> {} public class UnitStack<E extends Enum, V extends Value> {} public class UnitCurrency<V extends Value...
common-pile/stackexchange_filtered
Adding a separator (divider) to a react-select Select I am using the react-select API. It is straightforward to create a Select: import Select from "react-select"; <Select options={someOptions} value={someOption} ... /> What I am trying to do is to create a separator (divider) between the first option in ...
common-pile/stackexchange_filtered
PostgresSQL database has date field, I want all data but the date column as year only I have data that has a date column in the full format but would like the output to only represent the year. eg: from SELECT * FROM tablename; I want something like: SELECT * FROM tablename WITH 'newdatefield' as SELECT EXTRACT(YEAR F...
common-pile/stackexchange_filtered
Understanding a qry using Position function and '@" I recently asked a question where I was trying to figure out how to get a count of records that had a certain heading but once the record was counted with one of the headings it would not be counted again with another heading. I received this answer in sqlfiddle and ...
common-pile/stackexchange_filtered
Failed Permission Check error in Glassfish I have a glassfish server set up to host an api for an android application. When I use the application, everything works great, but when my client uses the application, he claims that it crashes when he tries to log in. I don't have access to his phone, so I can't tell exactly...
common-pile/stackexchange_filtered
Dynamic Links and Hosting disagreeing about whether the custom domain is properly connected or not I am trying to use custom domain for dynamic links in my firebase project. I opened dynamic links section in the firebase console and followed the instructions to add custom domain. After completing the DNS settings and w...
common-pile/stackexchange_filtered
Makemigrations in Django I cannot "makemigrations" in my Django project. When I try to do "python manage.py makemigrations" It shows the following Traceback (most recent call last): File "manage.py", line 15, in <module> execute_from_command_line(sys.argv) File "/home/ani/Desktop/Backup/venv/lib/python3.7/site...
common-pile/stackexchange_filtered
change system tray icon (quicklaunchicon) Launch4j, Inno setup I have created the exe file from jar and used this exe to create the installer using Inno setup. However when I install the system tray icon is not changing to custom icon I am proving in the .iss script. With Inno Setup the application icon which is displa...
common-pile/stackexchange_filtered
Any way to track custom statistics in locust Locust is a great and simple load testing tool. By default it only tracks response times and content length from which it can deduce RPS, etc. Is there any way to track custom statistics in locust as well? In my case a site Im testing returns couple of stats via headers. For...
common-pile/stackexchange_filtered
How to parse table with rowspan and colspan First, I have read Parsing a table with rowspan and colspan. I even answered the question. Please read before you mark this as duplicate. <table border="1"> <tr> <th>A</th> <th>B</th> </tr> <tr> <td rowspan="2">C</td> <td rowspan="1">D</td> </tr> <tr...
common-pile/stackexchange_filtered
how to quickly check communication protocol used by SQL Server I am using VSTS 2008 + C# + ADO.Net + SQL Server 2008. When connecting from another remote machine, normally TCP/IP protocol is used by ADO.Net client to connect to SQL Server 2008. When connecting locally (ADO.Net client and SQL Server on the same machine)...
common-pile/stackexchange_filtered
When i try to run this script, i get a error: OverflowError: unsigned short is greater than maximum. Raspberry pi 4B, the sensor is DHT11 The code: (it is very small, just to test the sensor) import adafruit_dht, board print("Current temperature is " + str(adafruit_dht.DHT11(board.D21).temperature)) Full error: Trace...
common-pile/stackexchange_filtered
(Probable) inconsistency in "id"s returned by facebook Graph API and Realtime Updates? related to Open Graph api for feed returning inconsistent results When I publish a post on a page's feed using my App, facebook returns some id in the form of <page_id>_<post_id>, but when the same App receives a Real time Update fro...
common-pile/stackexchange_filtered
When tomcat redeploy, the previous upload files are missing I'm writing a website with the function file uploading. And the Path I save the file is by ServletActionContext.getServletContext().getRealPath("xxxx") It will save the file to webapps/mywebsit/xxxx to allow the clients are able to access the data directly by ...
common-pile/stackexchange_filtered
Reverse BWT without knowing last character Usually in Burrows-Wheeler Transform algorithm, a $ character is used to signal the end of string, but in so many cases, this $ is omitted. I was wondering how it can be reversed without knowing the position of the last character? For example, I have this BWT: [[[[[1[[11en...
common-pile/stackexchange_filtered
New pypi org proxy not working with sonatype nexus Ever since https://pypi.python.org moved https://pypi.org. Our nexus repository is unable to pull the packages from this. Has anyone came across this issue and what is the solution for it. Thanks in advance. Did you resolve your issue? can you show your configuratio...
common-pile/stackexchange_filtered
Can I Mount an external hard drive as a network drive? is there any way to make a Mac think my external hard drive is a network drive? Basically I need a USB/Thunderbolt Drive to be recognised as a network drive on my Mac since the program (Avid Media Composer) I'm trying to use treats local and network drives differe...
common-pile/stackexchange_filtered
Simulating Java imports in C++ I am trying to translate a subset of Java to c++. How can i simulate imports(single and on-demand) in c++ ? Before you get ahead of yourself: How many other parts of this project have you figured out? C++ Is predominately a staticly linked language, although you can dynamically link ...
common-pile/stackexchange_filtered
how to schedule a python code to run daily? def job(): # Define variables  tickers = "AAPL GOOGL" start = "2021-08-01" end = date.today() tickers_split = tickers.split() df = pd.DataFrame() tickers_split for ticker in tickers_split: data = pdr.get_data_yahoo(ticker, start=start, end=end, interval='d...
common-pile/stackexchange_filtered
Insert JSON into Table using MySQL Workbench 6.3 or SQL Server 2012 I've got some JSON bank statement code that I need to insert into a table but I'm having trouble with how I would do this on SQL server 2012, as it seems possible on 2016+ but not on 2012. Either on there or MySQL would be ok - for reference, please ...
common-pile/stackexchange_filtered
Changing the source of an include in html, using Javascript? Currently I'm including one svg as external pug file, in my main pug file. Since I have multiple vectors (different files), I was wondering if there is an option to change the source of the include in JavaScript. Here is my pug structure .services_description...
common-pile/stackexchange_filtered
Iterator does not including values added to it inside a loop I have: ids = [1] I am doing ids.each do |id| to loop through ids and look for child ids to add to ids. Here's my code: ids.each do |id| # Do some things ids |= search_for_more_ids(id) end During the first iteration, ids gets a second value and become [...
common-pile/stackexchange_filtered
glfwInit() causes access violation #include <glfw3.h> int main() { glfwInit(); return 0; } When I try to run glfwInit() it throws an access violation and says "Frame not in module". 1 Which Compiler are you using? This error is shown because the error is produced in a non debuggable source code. The most ...
common-pile/stackexchange_filtered
Get records from a table with timestamps / echo a message in the row when the timestamp difference is more than 5 minutes I get a list of records and each record is a question / answer / timestamp. I created a basic PHP report: <?php $con = mysql_connect("localhost", "login", "pass"); if (!$con) { die('Could not co...
common-pile/stackexchange_filtered
Host timing out in Terminal and showing as connected in reachability iOS Today, I was testing the reachabilityWithHostName, and I'm typing a domain that is timing out inside the network that I'm joined, but the reachability its returning as its there a connection. Why is might this be occurring? Thanks Here is my ping ...
common-pile/stackexchange_filtered
How do I access my WordPress CSS ? I am trying to edit the background color to my CSS header. I tried accessing my CSS folder and according to my Developer tools console the CSS file's path should be gcc/wp-content/themes/reconstruction/css/main.css I ran my FTP server, followed the path and added some new CSS rules ...
common-pile/stackexchange_filtered
HTML - How to avoid a text in a cell table that overflow out when the cell is very short? I have something like this in my HTML page: <table> <tbody> <tr style="height: 20vh; line-height: 16px;"> <td width="1%" >Not important text in cell 1</td> <td width="42%">Important text in cell 2</td> <td ...
common-pile/stackexchange_filtered
How to use Azure DevOps to track tasks done yesterday and task to be performed today? How can i configure Azure DevOps to get reports similar to daily scrum meeting template. There is need to get report on what task was worked on yesterday, and what task will be done today, effectively generating the day wise report fo...
common-pile/stackexchange_filtered
PHP - get total number of array items with a specific number sequence in value So, basically I'm trying to count the number of landline phone numbers in a list of both landlines and mobile phone numbers $mobile_list<PHONE_NUMBER>90,02039989435,0781...) $mobile_array = explode(",",$mobile_list); // turn into an a...
common-pile/stackexchange_filtered
IIS Performance NUMA I have been struggling with an IIS issue and can't seem to find any answers. Basically here is the setup. I have a Dell Server with 4 processors 10 cores each with hyper-threading enabled. Giving me 80 logical cores. Server has Windows 2012 R2 Standard (IIS 8.5) installed and this creates two proce...
common-pile/stackexchange_filtered
CronJob Not running I have prepared a py Script to update my Django database once a day. Trying to use Crontab along with python to run the py script. 0 1 * * 4 /usr/bin/python3 /home/user/folder1/script1.py 0 2 * * * /usr/bin/python3 /home/user/folder1/folder11/script2.py Crontab is able to run the first script witho...
common-pile/stackexchange_filtered
How do I create a custom string from this array? Hi I have created an array from core-data using: NSArray* invoiceItem =[fetchedResultsController fetchedObjects]; which returns the following according to the log: "<Invoice: 0x8545900> (entity: Invoice; id: 0x8542dd0 <x-coredata://AF2BBB5C-4135-45EB-A421-5036AE02D2A0/I...
common-pile/stackexchange_filtered
ASP.NET MVC2: How to render a view if has multiple different models I know that view model can be used for rendering a view, but if a page needs different models, how can I pass them to the view? And how do I use them? If you need to pass multiple models then create an all-encompassing model that has the smaller model...
common-pile/stackexchange_filtered
Entity Framework DbContext won't save data into database I'm trying to do simplest thing in EF, to save data record into database table. Everything goes well, model gets created, added, and saved, but when I go to the table the is nothing... Does anybody see what I'm doing wrong? This is my DbContext: public class Auth...
common-pile/stackexchange_filtered
How can I get the newly generated key from a .push using Fireproof for Firebase? I am using fireproof so that I can make my Firebase calls Promise-based. Seems like a pretty great idea, but I'm having a hard time getting the newly generated key from a push firebase = new Firebase("https://mysite.firebaseio.com"); fbas...
common-pile/stackexchange_filtered
How to tell Firefox to render various text files directly, rather than asking for external application? When navigating to various pages that are in a text-based format, such as source code, .tex/.sty files, unix configuration files, &c, Firefox often —I think whenever it can determine the text file's MIME type— ask fo...
common-pile/stackexchange_filtered
Angular 6 & .Net Core 2 - XSRF token generated but empty when sent back to API I have a .net core 2.* API with an Angular 6.* application which I am trying to protect against XSRF attacks. When logging in, we get an auth token, then we make another call to get a XSRF token. On the client side we have a HTTP intercepto...
common-pile/stackexchange_filtered
intl.NumberFormat shows incorrect result for es-ES currency formatting I expect that output for es-ES and de-DE locale to be identical. (I asked my Spanish colleague to check his salary slip, and he confirms that there is indeed a decimal after thousand) var number = 1000; console.log(new Intl.NumberFormat('de-DE', { s...
common-pile/stackexchange_filtered
How to update the LED on a TI board and report to the server every second via UART I am modifying a code in embedded C language and trying to make it to where it checks buttons every 200ms, checks the temperature every 500ms, and update the LED and report to the server every second. My code appears to be complete but w...
common-pile/stackexchange_filtered
How to use library of other languages in Action Script 3? Is there any way to use the library of other language in Action Script 3 ? For C/C++ I learned that we can use Alchemy: http://labs.adobe.com/technologies/alchemy/ But for other languages (here I mean Ruby or Java), can I use their libs via AS3 ? No you can not...
common-pile/stackexchange_filtered
Magento 2 Bundle product dropdown options images guys! Can someone help me to view the image at the top of the bundle option dropdown? When I select an option to change the image. Thank you so much for your time and kindness.
common-pile/stackexchange_filtered
Call Python 3.x functions in Java I want to call Python functions in Java. I know there is Jython, which comes with the PythonInterpreter for Java, but sadly it only supports Python 2.7. For a better explanation of what I want to do. Let's say I have the following Python code in a given file: @staticmethod def my_firs...
common-pile/stackexchange_filtered
Get user location while app is background in cordova android application I am developing location based android application using cordova (ionicframework+angularjs).So when app is in background i have to get the userlocation ,so that i can provide location based push notification. Is that possible to run the app in bac...
common-pile/stackexchange_filtered
Terraform flatten tuple to set of string I have the following terraform allowed_ips tuple which contains a json of ip address and metadata about each ip. I am trying to flatten the tuple, to get a list of ip addresses in the format ["<IP_ADDRESS>", "<IP_ADDRESS>"] will then be passed to ip_rules variable Variable allow...
common-pile/stackexchange_filtered
node.js http(s): get ip address of remote server When I'm doing https.request({ host: 'domain.com', ... }), how can I get the actual IP address I'm connecting to? Note that domain.com resolving to multiple IPs and I want to know exactly the IP I'm connecting to. I tried to get it from socket.remoteAddress: req.on('sock...
common-pile/stackexchange_filtered
one-to-one relationship in database Suppose that I have a table users, with a PK id_user. I also have an identifying relationship between the table users and the table employer. I can use the PK id_user as foreign key in the table employer and also as PK (with unique constrain) in this table? In this case, the employe...
common-pile/stackexchange_filtered
While to check something in the database I want to check if I have an hour in the database but If I have more than hour in the database it outputs twice, if I have 3 three times... In this specific case this gives me: 9 (in blue color) and then 9 (in red color) $result = mysqli_query($con, 'SELECT * FROM consulta ...
common-pile/stackexchange_filtered
how does semaphore behave if multiple threads try to lock I am trying to understand semaphore and got to know that semaphore maintains a set of permits or allowed number of locks but still i am having lots of doubts. Is the allowed number of locks are maintained per instance of the class or whole class itself ? I mean ...
common-pile/stackexchange_filtered
Generic SQL Error on create of contact in dynamics crm 2011 I've unregistered all plugins and deactivated all workflows for the contact entity and also there is nothing at the on save event of the contact entity in MS Dynamics CRM. Also, I've restarted all async services and even IIS. But still I am facing SQL Server ...
common-pile/stackexchange_filtered
How would a human have to be gene-geneered to thrive in a zero-g environment? I'm trying to create a massive contained zero-g environment that can sustain many life-forms including humans. The research that I'm doing doesn't make it look good. Seems like we just need gravity. But say we could build a human to survive i...
common-pile/stackexchange_filtered