text
stringlengths
175
47.7k
meta
dict
Q: How to Visit the Node.js Server app on Ubuntu From other Computers I have installed the Node.js on Ubuntu 12.4 and the server is running localy but how I can see the rendered page by server from other computers? Do I need to have an IP address? for this? A: The command ifconfig will tell you what your IP address...
{ "pile_set_name": "StackExchange" }
Q: Laravel, Class controller does not exist in route with prefixes Namespace in group (or callback) don't work (Lumen, Laravel)? I want to remove the code from routes.php to controllers. And so! use App\Http\Controllers; // OK! $app->get('path', 'BarController@getId'); $app->group(['prefix' => 'foo'], function ($ap...
{ "pile_set_name": "StackExchange" }
Q: Why do Muslims run slowly in the first 3 Tawaf in Hajj? When muslims go to Umrah they have to perform the tawaf around the Kabah, why does the first 3 have to be at a faster pace? Also why is the Ihraam showing parts of the musculin body? A: why does the first 3 have to be at a faster pace? The reasoning behind ...
{ "pile_set_name": "StackExchange" }
Q: How do we get all folders containing images using MediaStore class (ANDROID)? I have used MediaStore Class to get all the folders of images inside storage. But the problem is it is showing the same folder as many times as the number of images in it. public void getImageDirProvider(){ Uri uri= MediaStore.Im...
{ "pile_set_name": "StackExchange" }
Q: android listview nullpointer.exception Im trying to display this listview, but I keep getting a: 07-17 21:14:22.233: ERROR/AndroidRuntime(349): java.lang.NullPointerException I think I know what the problem is but I dont know how to fix it. I have a String array which I will be using to be displayed in my list ...
{ "pile_set_name": "StackExchange" }
Q: Finding the dimension of and a basis for $\text{Hom}_K(U, V)$ I have a query regarding a linear algebra assignment. The question I must answer is the following: Let $U$ and $V$ be vector spaces of dimensions $n$ and $m$ over $K$, and let $\text{Hom}_K(U, V)$ be the vector space over K of all linear maps from U ...
{ "pile_set_name": "StackExchange" }
Q: how to implement marquee label in IOS using swift How to implement MarqueeLabel in iOS. I found example in Objective-C but I'm using Swift. A: For creating marquee in swift Add Below Class in your Project https://github.com/cbpowell/MarqueeLabel To do this first add the pod: pod 'MarqueeLabel'. And perform a po...
{ "pile_set_name": "StackExchange" }
Q: How do insurance funds work? On my wife's 403(b) (like a 401(k)), she has an option to invest in a couple insurance funds. How do these work? Some seem to be low-risk, while others are moderate-risk. I'm just not quite sure how insurance policies are something that could be invested in. A: Sometimes 403b's co...
{ "pile_set_name": "StackExchange" }
Q: What is the last action? In the question Why is processing a sorted array faster than an unsorted array?, today I see the active value is today, so I click the [today] and it moves to no-where. I want to know Why and When clicking on today moves to no-where? Edit : I found the list of activities And the fedorqui a...
{ "pile_set_name": "StackExchange" }
Q: How to calculate the volume of an $N$-dimensional hyper rectangular Let $H$ be an $N$-dimensional rectangular with edges of length $L_i$, $i=1,2,\dots,N$. Is the volume simply the product of the $L_i$, $i=1,2,\dots,N$? $$ \text{Volume} = L_1 \times L_2 \times \dots \times L_N$$ A: This is an easy one. Short resp...
{ "pile_set_name": "StackExchange" }
Q: How to ask "when do you open" and "when do you close"? In a shop or any other public place I can ask "¿Cuál es tu horario?" to mean what are the working hours, right? But I want to ask precisely when they open and when close. What'll be the proper way to ask this? And what form of a verb will I use? "Tu/Usted?" ...
{ "pile_set_name": "StackExchange" }
Q: Php Undefine Index Issue I'm creating a contact form with php. But when i run it in my xampp server i get a error message. I don't understand why this happened. I can't figure it out. Following is my error message. Error Message: Notice: Undefined index: Send in D:\Software\Installed\xampp\htdocs\Omdatech-Co\eng\...
{ "pile_set_name": "StackExchange" }
Q: Renumbering a set of rows I have a table with data which looks something like the following: # the columns # url title group id_within_group http://www.google.com google search engine 1 http://www.yahoo.com yahoo search engine 2 http://www.bing.com bing search engine 3 http://www.facebook.com facebook social m...
{ "pile_set_name": "StackExchange" }
Q: Algebraic Solution to Prove Tautology I need an algebraic solution to show this is a tautology: $\displaystyle [(p\lor q) \land (p \rightarrow r) \land (q \rightarrow r)] \rightarrow r$. Thanks A: $a\rightarrow b \equiv \neg(a)\lor b$, so what you have is equivalent to $$\neg\left[(p\lor q) \land [\neg p \lor ...
{ "pile_set_name": "StackExchange" }
Q: How to make an entire div clickable (table style divs) Yes, I know, this question have been asked many times and a possible solution is to add style="display:block;" to the link. For some reason this solution does not work with table style DIVs: https://jsfiddle.net/exyv8jmw/1/ HTML: <div class="table"> <div class...
{ "pile_set_name": "StackExchange" }
Q: Subscriber not receives message from client My Mosquitto server whole ACL file content: pattern write s1/%c pattern read s1/%c I know there should be possibility to have single line: pattern readwrite s1/%c But my server complains with error: Empty invalid topic access type in acl_file. I suppose two lines shou...
{ "pile_set_name": "StackExchange" }
Q: Pro's/Con's to database table layout as it relates to maintenance & extensibility Basic pseudo class layout below... class Location(): # Class containing information about a location. id address_one class CustomerLocation(Location): customer_id account_rep class VendorLocation(Location): ven...
{ "pile_set_name": "StackExchange" }
Q: How can i give a focus to a listBox in the constructor and when a new item was added? In the constructor i did: if (listBox1.Items != null) { listBox1.Focus(); } But when im running the program i cant move with the keyboards up down in listBox since the focus is on a button...
{ "pile_set_name": "StackExchange" }
Q: Value changes when using double to store the value in c++ but remains same in java I have similar code in c++ and java. There is a call by value to a double variable. I pass on a value of 1680.175 to both the codes. I can see during debugging that the value when passed changes to 1680.1749999999902 in c++ while it...
{ "pile_set_name": "StackExchange" }
Q: How do I use an ASP.NET MVC 3 DNN Module on different pages but passing different parameters? How do I use an ASP.NET MVC 3 DNN Module on different pages but passing different parameters? My requirement is to develop a DNN module using ASP.NET MVC that lists cities based on province. On another page I need to list...
{ "pile_set_name": "StackExchange" }
Q: Manipulating array results in segfault? I'm writing a C application which involves parsing a text file (in a format called VSM, hence the names below) into a tree structure. The designer of the format calls it a tagged tree. Each node has some key-value pairs (or attributes) and child nodes. Below are the struct a...
{ "pile_set_name": "StackExchange" }
Q: Grouping PHP Array on 2 or more different values I'm creating a recent activity section and I am trying to group similar items. I want to be able to group activities based on type of activity and who did the activity. For instance: Array ( [0] => Array ( [user] => Bill [type] =>...
{ "pile_set_name": "StackExchange" }
Q: Retrieve HTML of ReadMe Hi so first time working with APIs like this. Anyways, I've been reading up on the GitHub API and came across this: READMEs support custom media types for retrieving the raw content or rendered HTML. src: https://developer.github.com/v3/repos/contents/#get-the-readme Which I believe means...
{ "pile_set_name": "StackExchange" }
Q: Query next smaller and next bigger instance of model in one queryset in Django For example I have a following model: class Example(models.model): number = PositiveSmallIntegerField() I have 10 model instances saved in DB with number field like: [1, 2, 5, 8, 4, 75, 11, 6, 55, 18] And I would like to query 2 ...
{ "pile_set_name": "StackExchange" }
Q: How to dynamically mark input data? It's hard to explain in writing, so I'll attach a photo Let me explain. I would really appreciate it if you understood. After entering all the parts checked in the circle, When you click the checked button, I want to create a table dynamically and display the data in rows and ...
{ "pile_set_name": "StackExchange" }
Q: ¿Cómo programar una selección masiva en listView? Django Estoy programando un backend de ciudades en las que necesito añadirle una función de desactivar las ciudades que están marcadas, parecido a la funcionalidad propia de admin de Django. Modelo City class City(models.Model): name = models.CharField(max_len...
{ "pile_set_name": "StackExchange" }
Q: What are the biggest differences between boost.asio and the current networking TS? The C++ committee is currently working on a Networking Technical Specification. I was wondering what were the biggest differences with boost::asio. Moreover, I heard several times that the udp implementation in boost::asio is not as...
{ "pile_set_name": "StackExchange" }
Q: Why "foo".toString() is not the same as toString.call("foo")? Here is a question in JavaScript below: // Tested via Google Chrome console. var toString = Object.prototype.toString; "foo".toString(); // "foo" toString.call("foo"); // [object String] [].toString(); // "" toString.call([]); // [object Array] {}.to...
{ "pile_set_name": "StackExchange" }
Q: SQL query help needed joining and counting within a table This is my second post related to my join. Now I want to have a table that has the sum of counts for the males and females... I have a table called babynames that looks abit like this: firstname |sex |year |count Bob |M| 2010| 150 Bob |M| 2009| 100 Bob |M...
{ "pile_set_name": "StackExchange" }
Q: AnimationDrawable xml vs dynamically I was wondering, is there a difference memory-whise between defining an animationdrawable in xml and making the animationdrawable dynamically in your code? A: Because there was no answer I could accept, here is what was said (and what's right). There is no difference between...
{ "pile_set_name": "StackExchange" }
Q: Android Toast Messages are not shown using Fuel Framework I am using Fuel to send and receive requests from an API. However, I am not able to show Toast Messages or AlertDialogs, if the request was not successful. Sample Code: private fun validatePassword(): Boolean { var minPasswordLength = 0 val password...
{ "pile_set_name": "StackExchange" }
Q: webservice application in Demandware I need to develope WAS application and should be hosted into Demandware platform. Can i develop the WAS application using tomcat and can host it into the Demandware or should WAS application be developed in the Demandware platform? I am new to Demanware platform and WAS. Guide ...
{ "pile_set_name": "StackExchange" }
Q: Accessing superclass variables from an enum Is there any way to set a variable held in an enums parent/superclass from within an enum itself? (The following doesn't compile, but illustrates what I'm attempting to achieve).... class MyClass{ ObjectType type; String someValue; public void setT...
{ "pile_set_name": "StackExchange" }
Q: Can tab refer to other context element(panel) instead of the tab's context when I use jQuery UI 1.9 Tabs I want to use jQuery UI 1.9 Tabs like this way: HTML: <!-- this is the tab's context --> <div id="tabs"> <ul id="tabs-ul"> <li id="tabs-email"><a href="#Email" title="Email">Email</li> <li i...
{ "pile_set_name": "StackExchange" }
Q: Which is more correct: well or good? within the context given: Possible Duplicate: What is the difference between “good” and “well” "I work equally well as part of a team or as an independent researcher." or "I work equally good as part of a team or as an independent researcher." A: Well is correct here. You ...
{ "pile_set_name": "StackExchange" }
Q: C# "Using" Syntax Does the using catch the exception or throw it? i.e. using (StreamReader rdr = File.OpenText("file.txt")) { //do stuff } If the streamreader throws an exception is it caught by using or thrown so the calling function can handle it? A: When you see a using statement, think of this code: Strea...
{ "pile_set_name": "StackExchange" }
Q: Change default change detection strategy How to set the default change detection strategy to OnPush? Can it be set globally somehow? I want to avoid having to adding this line to every component @Component({ ... changeDetection: ChangeDetectionStrategy.OnPush, ... }) A: The change detection strategy ...
{ "pile_set_name": "StackExchange" }
Q: Dealloc when using Storyboard in Xcode 4.2.1 I found a somewhat related question at iPhone - dealloc - Release vs. nil, but it didn't answer my question. I created a button, a UIScrollview, and a label inside of it in the storyboard. When I Ctrl-dragged the objects to ViewController.h they created this: @interface...
{ "pile_set_name": "StackExchange" }
Q: DocuSign Sharepoint-on-Premise 2013 Connector Does anyone have any experience using the DocuSign Connector with SharePoint-On-Premise 2013? We have set up the connector but was prompted the following message: My SharePoint user has an email tied to my DocuSign administrator email, does anyone have any potential s...
{ "pile_set_name": "StackExchange" }
Q: jquery animate slide not working This my code but not work if i put slide way inside variable. just fade in and out working $('.sidebar-toggle').on('click', function(){ if( $('.sidebar-left').length > 0 ) { var SideWay = 'left'; var Sidebar = $('.sidebar-left'); } else { var SideWa...
{ "pile_set_name": "StackExchange" }
Q: SQL select row if column equal to row I got this table: | NINumber | fname | lname | mentored_by | --------------------------------------------- | DD1199XYZ | John | Smith | DD234CD1X | | DD0094CYY | Barry | Gibbson | DD0094CYY | | DD234CD1X | Mike | Hammer | NULL | | AB2323CYA | Peter | Falk ...
{ "pile_set_name": "StackExchange" }
Q: "It was an April" vs "It was in April" "It was an April afternoon. And the warm breezes of approaching summer had sent everyone, including Grandfather, indoors". The above sentences are from the story 'Adventures in a Banyan Tree' by the Indian English writer Ruskin Bond. (The context of the story is a school b...
{ "pile_set_name": "StackExchange" }
Q: What are ways a debug statement could "fix" bugs in a program? In a recent interview, I was asked the following question: You have a bug in your program, after attempting to debug it by inserting statements like printf, console.log, System.out.println, echo, etc, the bug disappears. How can this happen? I respon...
{ "pile_set_name": "StackExchange" }
Q: How do I secure the data in my winform's SQL 2005 Express database? I have a c# winform application that uses SQL 2005 Express. The application creates math and reading quizzes and is marketed to parents of school-aged children. The parents purchase and download SQL files containing quizzes from my website and i...
{ "pile_set_name": "StackExchange" }
Q: Unable to deserialize array via GET I am using Kendo UI's DataSource to send sorting information to my ServiceStack service. I know that this has been addressed if you're using using POST, but I want to adhere to RESTful designs, so the request verb needs to be GET. I'm using this snippet to test with: var dataS...
{ "pile_set_name": "StackExchange" }
Q: Cross-compiling coreutils I have problems trying to cross-compile the GNU coreutils (git clone https://git.savannah.gnu.org/git/coreutils.git) for ARM. Following other Q&As in the StackExchange network, I ended up with the following procedure: Setup: git clone https://git.savannah.gnu.org/git/coreutils.git cd core...
{ "pile_set_name": "StackExchange" }
Q: plsql oracle prevent the use of special characters in the 2nd char of string create or replace function MyFunction(v_FileName in varchar2) I want to prevent the use of special characters in the 2nd char in v_FileName. these characters are: !@#$%^&*()_+=`~[]{}'\|?/><,;: (i want to allow the use of . and ") i've tr...
{ "pile_set_name": "StackExchange" }
Q: animation jQuery scrollTop doesn't work properly Does animating the scrollTop property renders inaccurately. kindly check this code that i've made in jsbin http://jsbin.com/ewulum/2/edit what i would like to do is when a link is clicked it would automatically scroll down to it's corresponding section. But i can't...
{ "pile_set_name": "StackExchange" }
Q: How can I import all emails and tagging from one gmail account into another? It is easy to import the emails using pop etc? However how do I import: All my labels etc My contact list A: Did you read the answers to your other question? Per the link I gave in my answer to your other question: If you absolutely n...
{ "pile_set_name": "StackExchange" }
Q: Show a character's Unicode codepoint value in Eclipse I have a UTF-8 text file open in Eclipse, and I'd like to find out what a particular Unicode character is. Is there a function to display the Unicode codepoint of the character under the cursor? A: I do not think there is yet a plugin doing exactly what you a...
{ "pile_set_name": "StackExchange" }
Q: why doesn't haskell have heterogeneous lists I don't understand why I can't construct a list that looks like [1,"1",1.1] in haskell. I don't think it's static typing that gets in the way because I thought that head would now have an ill defined type but then I thought about it and there is no reason the run-time s...
{ "pile_set_name": "StackExchange" }
Q: dropdown menu css only - width of submenu (no text wrap) I have dropdown menu (css only) JSFIDDLE: >>> jsfiddle <<< HTML: <div class="menu"> <ul> <li><a href="#">Home</a></li> <li><a href="#">Tutorials</a> <ul> <li><a href="#">Photoshop</a></li> ...
{ "pile_set_name": "StackExchange" }
Q: Wrapping 's in using react-router I have 3 buttons that link to different pages. The main page is the only page that is supposed to display the buttons (App.js). I've created two more pages, table1.js, table2.js, table3.js that all display different things. My problem is, when I click either one of the buttons, i...
{ "pile_set_name": "StackExchange" }
Q: PECS: How to convert a Consumer to a Producer? I have a Restaurant that produces Meals. The kitchens is given plates that are Consumers. class Food{} class Bamboo extends Food {} interface Kitchen { void build(List<? super Food> dessert); } abstract class Restaurant { Kitchen kitchen; public Restaur...
{ "pile_set_name": "StackExchange" }
Q: How to get a value from an @Around declared method using AspectJ? This is my code snippet: @Around("execution(* de.my.package.path.controller.RecommendationController.recommendItems*(..))") public Object measureTimeWithOverhead(ProceedingJoinPoint joinPoint) throws Throwable { long startNanoTime = Syst...
{ "pile_set_name": "StackExchange" }
Q: Do I require loading in this example of load store architecture? I'm currently revising for my Concurrent Programming exam and I'm going through the past papers and one question poses the following process: Process P1 integer x; 1a: x = a + a; 1b: b = x; end P1; and asks the following question: Rewrite process...
{ "pile_set_name": "StackExchange" }
Q: How do I name a spreadsheet automatically, by referencing two cells? I've just finished writing a spiffy macro for automatically generating reports. It works well, but I need it to automatically name the spreadsheet according to the data in two cells. Essentially, this macro creates a new spreadsheet, copies the ...
{ "pile_set_name": "StackExchange" }
Q: How does a Solar Transit give more accurate determination of Earth-to-Sun distance? I understand how Solar Parallax calculation determines the Earth-Sun distance using measurements of (a) the baseline distance between two widely-separated terrestrial telescopes and the (b) two angles - one at each telescope - betw...
{ "pile_set_name": "StackExchange" }
Q: Why is id generated for local variable only when flush is made before save? Lets say I have three classes. public class Parent { @Id @GeneratedValue @Column(name = "parent_id", updatable = false, insertable = false) private Long id; private String name; @Builder.Default @OneToMany(map...
{ "pile_set_name": "StackExchange" }
Q: node js POST mysite/uploads 404 (Not Found) when uploaded to azure but works locally I'm working on an upload project for a small webpage and I made it all work locally, I can upload files, I can manipulate them and I can get necessary data in response. I pushed the whole thing on azure last night and now when I t...
{ "pile_set_name": "StackExchange" }
Q: Spinal compression in abmat situps compared to standard situps and other ab exercises I just read a paper by Axler and McGill (get it here) which compared 12 differend ab exercises their spinal compression force and the EMG intensity. Abmat situps where not analyzed. Is there any paper, which analyses the abmat si...
{ "pile_set_name": "StackExchange" }
Q: Functions of nested class thinks 'self' as an argument - Python I'm trying to make a game of tic-tac-toe. I have one class, Player, and one nested class, Check, in it. This is my full code: class Player: # Player class '''this is a class for the player in a tic-tac-toe game''' def __init__(self, counter): # initi...
{ "pile_set_name": "StackExchange" }
Q: Display Windows application via SSH X11 on Linux Is possible to Run SSH server on Windows then make X11 connection forwarding enabled from Linux to this Windows and display Windows application on Linux? A: Linux to Windows An X11 application uses an X Server to display the app's Graphical User Interface (GUI). M...
{ "pile_set_name": "StackExchange" }
Q: How to use the `assigned` and `updated` parameters of functools.wraps? I know wraps has attributes as below: functools.wraps(wrapped[, assigned][, updated]) But I want know how to use the assigned and updated params, does anyone have an example? A: The "assigned" parameter tells which attributes on the wrapper ...
{ "pile_set_name": "StackExchange" }
Q: How Do I cast between 2 types that implement the same interface I have a overlapping data objects that need to be given to at least one, possibly more, of several calculation methods to produce a common data object. I think this is best solved by implementing both covarriance contravariance but I haven't been abl...
{ "pile_set_name": "StackExchange" }
Q: Tchart change labels I need a little help on changing the labels shown on a tchart I use this code to populate the tchart: With Series1 do begin clear; Add (v[1], 'abcdef', clRed); Add (v[2], 'aaaaaaaaaaaaaaaaaaaaaaaa', clBlue); Add (v[3], 'bbbbbbbbbbbbbb', clGreen); end; I get this...
{ "pile_set_name": "StackExchange" }
Q: calculate Geometric mean return for specific rows I have a dataframe like this. Date price mid std top btm .............. 1999-07-21 8.6912 8.504580 0.084923 9.674425 8.334735 1999-07-22 8.6978 8.508515 0.092034 8.692583 8.324447 1999...
{ "pile_set_name": "StackExchange" }
Q: How to find point on a circle that's opposite another point? How do I find the coordinate of point and angle value on circle sprite which placed on opposite side of sprite from a touch point and the center point of the sprite? I know A position, B position and sprite circle size. How do I calculate the position of...
{ "pile_set_name": "StackExchange" }
Q: Can I use the same iTunes Library on both Mac OS and Windows? I'm running Boot Camp, and once in a while I'd like to listen to music under Windows too. Is there a way I can use the same library under both Mac OS and Windows? Just changing the "iTunes Music" folder in Windows iTunes' preferences won't do it. A: I...
{ "pile_set_name": "StackExchange" }
Q: How to make header of a table "draggable" I have a table. The top row has 2 columns - "header" and "close" button. I can make the entire table "draggable". How can I make the "header" to be the only element that user can drag in order to move the entire table around? UPDATED: As tagged, I need to use jQuery. This ...
{ "pile_set_name": "StackExchange" }
Q: LoopBack Remote Method to return array of records I used loopback to generate my api and AngularJS to communicate with it. I have a model called Sync that contains the following records: Sync": { "34": "{\"uuid\":\"287c6625-4a95-4e11-847e-ad13e98c75a2\",\"table\":\"Property\",\"action\":\"create\",\"timeChanged\":...
{ "pile_set_name": "StackExchange" }
Q: Who was served his own children cut into pieces? I'm looking for the name an ancient man who was subject to being served his own children in pieces and eating them unknowingly. He was invited for dinner by the king where this took place. Later, he had the chance to revenge himself, helping with a battle in which t...
{ "pile_set_name": "StackExchange" }
Q: Build containers for dev and production environment How do you build images for development and for production(swarm): I am trying to have one Dockerfile for both to keep "Dockerfile implementation in one place" like inheritance: FROM golang AS gobase ENV APP_ENV "pro" COPY ./app /go/src/github.com/user/myProject/...
{ "pile_set_name": "StackExchange" }
Q: Can I put the 'query' part of a =QUERY in a cell? I am playing with Google Spreadsheet's =QUERY(), and I was wondering if / how I can put the query part in a cell. For, for example, I have =QUERY(dataset, B1, 1) in cell A1, and SELECT * in cell B1. When I try it, I get a #REF! error in cell A1. If I change the q...
{ "pile_set_name": "StackExchange" }
Q: Delete 75% Of a Table Randomly Trying to make a smaller sample database but still have the data be somewhat statistically relevant. How can I delete x % of rows from the table ? Been fooling around with the NEWID() function. A: DELETE FROM TABLE_NAME WHERE PK IN (SELECT TOP (75) PRECENT PK FROM T...
{ "pile_set_name": "StackExchange" }
Q: Clean Install of Laravel using Code Bright Basic Routing Example Not Routing I've just as of right now started to learn Laravel and Composer and I've been following the Basic Routing example I found in Code Bright. I've cloned the Laravel repo, and installed it using Composer as mentioned in the previous Installa...
{ "pile_set_name": "StackExchange" }
Q: How do I use the cookie container with RestSharp and ASP.NET sessions? I'd like to be able to call an authentication action on a controller and if it succeeds, store the authenticated user details in the session. However, I'm not sure how to keep the requests inside the session as I'm using RestSharp as a detached...
{ "pile_set_name": "StackExchange" }
Q: How check at lease one checkbox is checked inside ASP.NET repeater control in Javascript In my asp.net website; i have REPEATER control having child control checklistbox , dynamically generates in code behind. I would like to know how can i write javascript function where i have to check at least one checkbox shou...
{ "pile_set_name": "StackExchange" }
Q: Function trait and implicit parameters The following works: object X extends (Int => String => Long) { def apply(x:Int):String => Long = ??? } How could I type an apply function with an implicit parameter? I have the following method: def apply(x:Int)(implicit y:String):Long = ??? How can I describe the funct...
{ "pile_set_name": "StackExchange" }
Q: How to "customize" my elements in a matrix R I wanna build an nxm matrix, n< m, and i want each element Mij = i^j Any ideas? I tried multiplying various vectors etc but i never get the correct result. A: n <- 3 m <- 4 outer(seq_len(n), seq_len(m), "^") # [,1] [,2] [,3] [,4] #[1,] 1 1 1 1 #[2,] ...
{ "pile_set_name": "StackExchange" }
Q: Representing an Entity Type with two parent types in an Entity-Relationship Diagram? I have entity type called STUDENT which has two sub-types: GRADUATE, and UNDERGRADUATE. Easy enough. Now, I (presumably based on specifications) also have another entity type called RESEARCH ASSISTANT, which is defined as being a ...
{ "pile_set_name": "StackExchange" }
Q: Do Shrines affect Followers? I always assumed they did (your follower runs as fast as you after you trigger a Fleeting Shrine). However, I noticed that my follower's damage did not increase (whereas mine did) after I triggered a Frenzied Shrine. A: No, shrines have no effect on followers. Legendary gems also do ...
{ "pile_set_name": "StackExchange" }
Q: Racket, include, require and provide don't work I have a file with the name “functions.rkt”, where I have some functions. And I am working in another file, let’s name it “working.rkt” I have tried the following (one by one) at “working.rkt” to use the function defined at “functions.rkt”: (require “functions.rkt”) ...
{ "pile_set_name": "StackExchange" }
Q: How to add a number to int when in loop in Python So i am new to programming in general and i am trying to make a number guessing system so it would give you 7 tries and how many tries you had at the end when the number was guessed tried already doing this if c < z: print('Higher') print('Tries...
{ "pile_set_name": "StackExchange" }
Q: 2002/2003 PC Game about Super-soldiers winning against aliens but losing Earth coming back? A long time ago I remember playing a PC game around the time of HALO: COMBAT EVOLVED clones... one stood out in particular. The story preface revolves around a war between Earth and aliens. Humans win by the skin of their t...
{ "pile_set_name": "StackExchange" }
Q: GLSL shader not unrolling loop when needed My 9600GT hates me. Fragment shader: #version 130 uint aa[33] = uint[33]( 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0 ); void main() { int i=0; int a=26; for (i=0; i<a; i++) aa[i]=aa[i+1]; gl_FragColor=vec4(1.0,...
{ "pile_set_name": "StackExchange" }
Q: Remove duplicates chars recursively I'm trying to write a recursive function which remove all duplicate chars from a given string recursively. For example "Hello world" -> "Helo wrd". The limitations I have are: No loops allowed. No more arguments can be added to the original function (remove_duplicates). No func...
{ "pile_set_name": "StackExchange" }
Q: Explanation about Javascript function inside function? I've been learning about js for a while, I almost understand about its main concepts such as prototype, oop ... however I can't understand how this works: User.findOne().where('socialid').equals(id).where('socialnetwork').equals(snw).exec(function (arr,data) {...
{ "pile_set_name": "StackExchange" }
Q: How to use table variable in a dynamic sql statement? In my stored procedure I declared two table variables on top of my procedure. Now I am trying to use that table variable within a dynamic sql statement but I get this error at the time of execution of that procedure. I am using Sql Server 2008. This is how my q...
{ "pile_set_name": "StackExchange" }
Q: Programming in Java bytecode example i want to ask how i can write in bytecode, i need some example for sample things like make a function etc... if someone can tell me how to write this code in bytecode i can mabey compare and learn from this. how do i write this java code in bytecode ? package Bytecode; public ...
{ "pile_set_name": "StackExchange" }
Q: Passing cv::Mat by reference or return it? I was wondering which version of this function is more efficient: void myimread (cv::Mat &mat, const std::string &imgname){ mat = imread(imgname); } or cv::Mat myimread (const std::string &imgname){ return imread(imgname); } From my knowledge, cv::Mat is kinda of a ...
{ "pile_set_name": "StackExchange" }
Q: Convert Array From IP CIDR <?php function cidrToRange($cidr) { $range = array(); $cidr = explode('/', $cidr); $range[0] = long2ip((ip2long($cidr[0])) & ((-1 << (32 - (int)$cidr[1])))); $range[1] = long2ip((ip2long($range[0])) + pow(2, (32 - (int)$cidr[1])) - 1); return $range; } var_dump(cidrToRange(...
{ "pile_set_name": "StackExchange" }
Q: Method for email testing I am writing a program that will be emailing reports out many (~100) clients which I want to test before I spam everyone. I want to do a test run against my production data and actually send the messages to a SMTP server, but I don't want the SMTP server to actually deliver the messages. ...
{ "pile_set_name": "StackExchange" }
Q: How can I resolve 404 errors caused by CGIRootFix? I'm deploying Flask on a shared server where I am needing to serve it with CGI. I've been able to remove the filename from the URLs with the following .htaccess code: AddHandler cgi-script .cgi .pl RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ...
{ "pile_set_name": "StackExchange" }
Q: Запустить bat файл в новой консоли и вернутся сразу не дожидаясь завершения Как запустить две консоли одновременно? У меня есть .bat файл в нем команды для запуска сервиса ngrok (ngrok.exe tcp 4040). В моей программе код os.system('1.bat') при выполнении открывает консоль ngrok, а моя программа прекращает работу (...
{ "pile_set_name": "StackExchange" }
Q: How do I cook beans without having too many that are split? Whenever I have cooked beans from raw (dried), many of the beans split. But if I buy canned beans, there are fewer split beans. How are the canned beans cooked so that there are fewer split beans? A: Beans split because the seed coat isn't soft enough w...
{ "pile_set_name": "StackExchange" }
Q: PHP if does not equal to or another does not equal to I am trying to do a conditional if statement that checks whether the value of a variable $cat_ID is not equal to 19 or 26 then it should echo my $priceToShow variable. PHP if(($cat_id != '19') || ($cat_id !='26')){ echo $priceToShow; } A: If it can be ne...
{ "pile_set_name": "StackExchange" }
Q: Is there any way to do this without using '__init__'? class a(object): c=b()# how to call the b method d=4 def __init__(self): print self.c def b(self): return self.d+1 a() how to call the 'b' method not in the __init__ thanks the error is : Traceback (most recent call last): ...
{ "pile_set_name": "StackExchange" }
Q: Will 11.10 or 12.04 run on my system? I have an old pc,so i am curious about runing ubuntu 11.10 or 12.04 on my configuration. Is it possible to run them on this: Processor :AMD Athlon +2200 1.8GHz overclocked to 2GHz. Motherboard: ASUS A7V8X-X. Graphic card: Diamond ATI Radeon 9550 128mb. RAM: 1 GB (256mb+256mb+5...
{ "pile_set_name": "StackExchange" }
Q: document.evaluate returns null with iterateNext Ive been following the examples from w3 schools on using a xpath to navigate through my xml document however all i get back from iterateNext() is null. Below is my blog.xml file. <blog xmlns ="http://www.w3schools.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema...
{ "pile_set_name": "StackExchange" }