Id
int64
34.6M
60.5M
Title
stringlengths
15
150
Body
stringlengths
33
36.7k
Tags
stringlengths
3
112
CreationDate
stringdate
2016-01-01 00:21:59
2020-02-29 17:55:56
Y
stringclasses
3 values
34,615,898
React Server side rendering of CSS modules
<p>The current practice for CSS with React components seems to be using webpack's style-loader to load it into the page in.</p> <pre class="lang-js prettyprint-override"><code>import React, { Component } from 'react'; import style from './style.css'; class MyComponent extends Component { render(){ return ...
<reactjs><webpack><webpack-style-loader>
2016-01-05 15:57:15
HQ
34,616,050
How to check if a char is in the alphabet in C#
<p>I think the title says enough.</p> <pre><code>void onClickSubmit(char submit) { if(submit.//check if it is alphabetical) { //some code } } </code></pre> <p>how can i check if the char submit is in the alphabet?</p>
<c#><char><alphabet>
2016-01-05 16:04:27
LQ_CLOSE
34,616,725
C: non-NULL terminated unsigned char *
I saw [here][1] that it isn't possible to find out an unsigned char * length using strlen if it isn't NULL terminated, since the strlen function will go over the string but won't find any '\0', hence a run-time error. I figure that it is exactly the same for signed char *. I saw a code snippet that was doing somethi...
<c><string><sizeof><strlen>
2016-01-05 16:38:56
LQ_EDIT
34,616,857
GKMinmaxStrategist doesn't return any moves
<p>I have the following code in my <code>main.swift</code>:</p> <pre><code>let strategist = GKMinmaxStrategist() strategist.gameModel = position strategist.maxLookAheadDepth = 1 strategist.randomSource = nil let move = strategist.bestMoveForActivePlayer() </code></pre> <p>...where <code>position</code> is an instanc...
<swift><gameplay-kit><gkminmaxstrategist>
2016-01-05 16:44:42
HQ
34,617,066
Passing array (c++)
Code: #include <stdio.h> #include <string.h> #include <malloc.h> #include <stdlib.h> #include <math.h> #include <assert.h> #include <iostream> using namespace std; void case1(); void case2(); void case3(); void case4(); void case5(); ...
<c++><arrays><parameter-passing><pass-by-reference>
2016-01-05 16:54:38
LQ_EDIT
34,617,157
Is it possible to host telegram on my own server?
<p><a href="https://telegram.org/" rel="noreferrer">Telegram</a> is a cloud based chat service. All of their clients are open source. I was wondering if there's a way to host a 'private' telegram service on my own server. </p> <p>If not, is there anything out there that can provide all or almost all features that tele...
<telegram>
2016-01-05 16:59:38
HQ
34,618,039
How to implement bit error based on percentage in C?
<p>I'm stuck at trying to simulate an Binary Symmetric Channel in C.</p> <p>It should work like this: the user enters a number (for example 0.01 = 1%) which represents error rate. So, for instance, if i read 1001 from file every bit has a chance to change its value to 0/1 respectively depending on the entered percent....
<c>
2016-01-05 17:44:36
LQ_CLOSE
34,618,504
How can I pull down a commit from Github (Enterprise) that I don't have locally?
<p>I accidentally did a <code>push --force</code> on the wrong repo (too many termminals open), effectively resetting the master branch back to an earlier commit.</p> <p>Looking at my build system I can see that the commit used to point to XYZ, however I don't have that commit locally as I hadn't done a pull or fetch ...
<git><github>
2016-01-05 18:13:39
HQ
34,618,978
how to give different file name every time i capture video and write it to file?
<p>I am newbee in opencv. I am working on part of the project.</p> <p>In the below code, I have used <strong>VideoWriter</strong> class to store video with name <strong>MyVideo.avi</strong> as I specified in below code. But every time i capture video it stores with same name i.e it get overridden. <strong>So I want to...
<c++><qt><opencv><image-processing><computer-vision>
2016-01-05 18:40:33
LQ_CLOSE
34,619,145
Laravel: find out if variable is collection
<p>I want to find out if a variable is a collection.</p> <p>I can't use is_object() because it will be true even if it is not an collection. For now I use this, and it works:</p> <pre><code>if(is_object($images) &amp;&amp; get_class($images) != 'Illuminate\Database\Eloquent\Collection') { </code></pre> <p>But I thin...
<php><laravel><collections>
2016-01-05 18:50:02
HQ
34,619,256
Access OBDC Connection to SQL SERVER
I setup a new user with a new computer and installed MS Office. When I open the link to the access DB I get the error "OBDC - connection to SQL Server Native Client 11.0Path/of/Accessdb" Unfortunately I did not develop the Access DB and have no documentation on how to configure it from the developer
<sql-server><ms-access-2010>
2016-01-05 18:56:25
LQ_EDIT
34,619,305
functions calling functions python
def one_good_turn(n): return n + 1 def deserves_another(n): return n + 2 I don´t quite understand when it is asked me change the body of deserves_another, so that it always adds 2 to the output of one_good_turn?
<python>
2016-01-05 18:59:40
LQ_EDIT
34,619,539
Web service integration in Java
<p>I have created a web application, now i was asked by my professor to integrate it with another application using a provided web service.Given this is my first time working with web services, i read a lot about it(wsdl,SOAP..). But i still seem to be confused about the concept. I have 2 application mine and another o...
<java><web-services><soap><wsdl>
2016-01-05 19:15:12
LQ_CLOSE
34,620,317
Asynchronous classes and its features
<p>Newbie in programming, I am trying to understand <strong>Asynchronous</strong> classes and the benefits. What features can be included in a class that supports such operations? With example too</p>
<java>
2016-01-05 20:05:50
LQ_CLOSE
34,620,469
Safely assign value to nested hash using Hash#dig or Lonely operator(&.)
<pre><code>h = { data: { user: { value: "John Doe" } } } </code></pre> <p>To assign value to the nested hash, we can use</p> <pre><code>h[:data][:user][:value] = "Bob" </code></pre> <p>However if any part in the middle is missing, it will cause error.</p> <p>Something like </p> <pre><code>h.dig(...
<ruby><hash><dig><ruby-2.3><safe-navigation-operator>
2016-01-05 20:16:30
HQ
34,620,482
C# Reading Paths From Text File Says Path Doesn't Exist
<p>I'm developing a small command line utility to remove files from a directory. The user has the option to specify a path at the command line or have the paths being read from a text file.</p> <p>Here is a sample text input:</p> <pre><code>C:\Users\MrRobot\Desktop\Delete C:\Users\MrRobot\Desktop\Erase C:\Users\MrRob...
<c#><command-line><text-files><streamreader>
2016-01-05 20:17:17
LQ_CLOSE
34,621,006
How can a file contain null bytes?
<p>How is it possible that files can contain null bytes in operating systems written in a language with null-terminating strings (namely, C)?</p> <p>For example, if I run this shell code:</p> <pre><code>$ printf "Hello\00, World!" &gt; test.txt $ xxd test.txt 0000000: 4865 6c6c 6f00 2c20 576f 726c 6421 Hello., ...
<c><macos><null-terminated>
2016-01-05 20:50:31
HQ
34,621,080
Finding and removing consonants in a word: my program does not deliver the consonants
here is my program import time print('hello, i am the consonants finder and i am going to find he consonants in your word') consonants = 'b' 'c' 'd' 'f' 'g' 'h' 'j' 'k' 'l' 'm' 'n' 'p' 'q' 'r' 's' 't' 'v' 'w' 'x' 'y' 'z' word = input('what is your word: ').lower() time....
<python><python-3.5>
2016-01-05 20:55:13
LQ_EDIT
34,621,093
Persist Elastic Search Data in Docker Container
<p>I have a working ES docker container running that I run like so</p> <pre><code>docker run -p 80:9200 -p 9300:9300 --name es-loaded-with-data --privileged=true --restart=always es-loaded-with-data </code></pre> <p>I loaded up ES with a bunch of test data and wanted to save it in that state so I followed up with </p...
<elasticsearch><docker>
2016-01-05 20:56:00
HQ
34,621,576
The background music keep restarting. How to stop it.
<p>I create a sharedInstance of a background music and initialize it in the viewDidLoad of the first view controller. But when i change the screen (via segue) and come back to the first screen, the music restart. I believe that's happen because the viewDidLoad it's called again, but i don't want the music to keep resta...
<ios><swift><avfoundation><segue>
2016-01-05 21:31:33
LQ_CLOSE
34,621,905
need help to solve stock market puzzle in java for max profit
need max profit. what i can modify to get the max profit if i can only buy once and sell once. means if i buy at 5 and sell at 150 then its max profit. Currently what is have done is buy when price is less than next day ,and sell if price is more than next day. as obvious We have to keep in mind we can se...
<java><algorithm>
2016-01-05 21:54:26
LQ_EDIT
34,622,082
Why is a closing brace showing no code coverage?
<p>I've got a Swift function for which Xcode is showing 0 passes in code coverage. The line is a closing brace (highlighted in red below).</p> <p>Is this a bug in Xcode? If not, what condition do I need to hit to run that line? I thought I was covering all paths through this method.</p> <p><a href="https://i.stack.im...
<xcode><unit-testing><xcode7><code-coverage>
2016-01-05 22:07:06
HQ
34,622,482
How does ap fromMaybe compose?
<p>There I was, writing a function that takes a value as input, calls a function on that input, and if the result of that is <code>Just x</code>, it should return <code>x</code>; otherwise, it should return the original input.</p> <p>In other words, this function (that I didn't know what to call):</p> <pre><code>foo ...
<haskell><monads>
2016-01-05 22:34:27
HQ
34,622,755
Select all text between quotes, parentheses etc in Atom.io
<p>Sublime Text has this same functionality via:</p> <p><code>ctrl+shift+m</code> or <code>cmd+shift+space</code></p> <p>How do I accomplish the same thing in Atom?</p>
<editor><sublimetext3><atom-editor>
2016-01-05 22:55:51
HQ
34,623,229
webpack loaders and include
<p>I'm new to webpack and I'm trying to understand loaders as well as its properties such as test, loader, include etc.</p> <p>Here is a sample snippet of webpack.config.js that I found in google.</p> <pre><code>module: { loaders: [ { test: /\.js$/, loader: 'babel-loader', include: [...
<javascript><ecmascript-6><webpack><webpack-style-loader>
2016-01-05 23:39:11
HQ
34,623,694
Run code on application startup Phoenix Framework (Elixir)
<p>Were would you put code which you want to run only when your application/api starts in vanilla Phoenix application? Let's say I want to make sure some mnesia tables are created or configure my logger backend. The other thing is runtime configuration. They mention it in documentation but it's not clear to me where on...
<elixir><phoenix-framework>
2016-01-06 00:26:25
HQ
34,624,085
Can I export a Sqlite db using RedBean PHP ORM and Import to MySQL?
<p>I have a simple web app that I've been building using <code>redbean</code> PHP which has a really simple structure with three bean types:</p> <p>areas buildings persons</p> <p>All relationships are exclusive 1:Many. So, a <code>Person</code> belongs to only 1 <code>Building</code>, and a <code>Building</code> belo...
<php><mysql><sqlite><redbean>
2016-01-06 01:12:21
HQ
34,624,100
Simulate display: inline in React Native
<p>React Native doesn't support the CSS <code>display</code> property, and by default all elements use the behavior of <code>display: flex</code> (no <code>inline-flex</code> either). Most non-flex layouts can be simulated with flex properties, but I'm flustered with inline text.</p> <p>My app has a container that con...
<css><reactjs><flexbox><react-native>
2016-01-06 01:13:51
HQ
34,624,174
Will I be able to test this PHP?
<p>So I have 2 websites. One is currently hosted on a domain and one is just local on my computer (viewing it using brackets live preview).</p> <p>I used the hosted website (#1) to create a mysql database. </p> <p>Then for my local website (#2) I created a login page and created a index.php document to handle the sub...
<php><html><mysql>
2016-01-06 01:23:08
LQ_CLOSE
34,624,363
Django Bootstrap App differences with the normal Bootstrap
<p>I read in books and see in tutorials that is better to use a Django Bootstrap example:</p> <p><a href="https://github.com/dyve/django-bootstrap-toolkit" rel="nofollow">https://github.com/dyve/django-bootstrap-toolkit</a></p> <p><a href="https://github.com/dyve/django-bootstrap3" rel="nofollow">https://github.com/d...
<python><django><twitter-bootstrap>
2016-01-06 01:47:23
LQ_CLOSE
34,624,978
Is there easy way to grid search without cross validation in python?
<p>There is absolutely helpful class GridSearchCV in scikit-learn to do grid search and cross validation, but I don't want to do cross validataion. I want to do grid search without cross validation and use whole data to train. To be more specific, I need to evaluate my model made by RandomForestClassifier with "oob sco...
<python><scikit-learn><random-forest><grid-search>
2016-01-06 03:09:35
HQ
34,625,089
Python equivalent of golang's defer statement
<p>How would one implement something that works like the <code>defer</code> statement from go in python? </p> <p>Defer pushes a function call to a stack. When the function containing the defer statement returns, the defered function calls are popped and executed one by one, in the scope that the defer statement was in...
<python><go><deferred>
2016-01-06 03:21:52
HQ
34,625,720
object twitterBootstrap is not a member of package views.html.helper
<p>Read from stdout: D:\PROJECTS\test\SimpleRequest5\app\views\products\editProduct.scala.html:11: object twitterBootstrap is not a member of package views.html.helper D:\PROJECTS\test\SimpleRequest5\app\views\products\editProduct.scala.html:11: object twitterBootstrap is not a member of package views.html.helper Read ...
<scala><playframework>
2016-01-06 04:36:53
LQ_CLOSE
34,625,829
Change button style on press in React Native
<p>I'd like the style of a button in my app to change when it is being pressed. What is the best way to do this?</p>
<javascript><reactjs><react-native>
2016-01-06 04:50:08
HQ
34,625,888
How to display date in Month and year format in R
I have a date variable which has date in "Fri Nov 27 20:17:01 IST 2015" format. I need to display it as NOv 2015. How can i do that in R? Please help
<r>
2016-01-06 04:56:11
LQ_EDIT
34,626,975
hi, i want to format sql result in to givin format using sql server
sql result ----> id student_name class 1 abc 1A 2 xyz 1A 3 dsk 1A 4 uij 1A ................. ................. ................. ................. ................. up 1000 results and i want to format data in my specific format id1 student_name1 class1 i...
<sql-server>
2016-01-06 06:29:56
LQ_EDIT
34,626,978
Laravel framework tutorial
<p>I'm a PHP developer and want to learn <strong>php laravel framework</strong> . What is the most helpful website to learn Laravel framework ?!</p> <p>Thanks for helping 😊</p>
<php><laravel>
2016-01-06 06:30:00
LQ_CLOSE
34,627,900
IE-9 giving fakepath when using input type file
<p>I wasn't able to read the file in IE-9. I am generating base64 from the url. In all the other browsers it works, except for IE-9. Can anyone please help me with this? I am getting c://fakepath/images.jpg in IE-9</p> <pre><code>if((navigator.userAgent.indexOf("MSIE") != -1 ) || !!document.documentMode == true )) /...
<javascript><internet-explorer-9>
2016-01-06 07:37:49
LQ_CLOSE
34,627,959
Draft refuses handshake when using java-websocket library to connect to the coinbase exchange websocket stream
<p>I am attempting to use the <a href="https://github.com/TooTallNate/Java-WebSocket" rel="noreferrer">Java-Websocket library by TooTallNate</a> to create a websocket client that receives messages from the <a href="https://docs.exchange.coinbase.com/" rel="noreferrer">coinbase exchange websocket stream</a>. I am portin...
<java><websocket><java-websocket>
2016-01-06 07:42:35
HQ
34,627,992
Android - Refresh An Activity , but it should not clear previous selection areas
This is code of MainActivity languages = (Spinner) findViewById(R.id.spin_lang); languages.setOnItemSelectedListener(new OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View v, int pos, long id) { // TODO Auto-generated method stub if (pos==1...
<android>
2016-01-06 07:45:03
LQ_EDIT
34,628,088
I want to assign strings to the student constructor's parameters based on what is typed into the JOptionPane
I want to assign strings to the student constructor's parameters based on what is typed into the JOptionPane input boxes . I have the user inputted information set to go to a variable but when I try and use those variables as my Parameters for the constructor I get an error. This is the Main import javax.swi...
<java>
2016-01-06 07:51:49
LQ_EDIT
34,628,957
apache cordova game development, is it valid?
<p>I've been developing a game using libgdx (Java), it's basically a super mario game, a few moving objects, some sound effects, could something like that be done with html5 and javascript?</p> <p>I tried searching the world wide web for some info, but didn't find a lot, I guess it's not common, or even possible?</p> ...
<javascript><html><cordova>
2016-01-06 08:52:17
LQ_CLOSE
34,628,958
How do i implement the algorithm below
Get a list of numbers L1, L2, L3....LN as argument Assume L1 is the largest, Largest = L1 Take next number Li from the list and do the following If Largest is less than Li Largest = Li If Li is last number from the list then return Largest and come out Else repeat same process starting from step 3 Create a fu...
<python><algorithm>
2016-01-06 08:52:17
LQ_EDIT
34,628,979
Format date with "/" to "-" with javascript
<p>I have this Javascript function that takes X number of days and returns a date in the past</p> <pre><code> var GetDateInThePastFromDays = function (days) { var today = new Date(); _date = new Date(today.getFullYear(), today.getMonth(), today.getDate() - days); return _date.toLocaleDateStri...
<javascript><jquery><html><date>
2016-01-06 08:53:30
LQ_CLOSE
34,628,999
swift force-unwrapping exception not propagated
<p>I've run into this silly behaviour in swift where force-unwrapping an optional does not propagate.</p> <p>From the documentation:</p> <blockquote> <p>Trying to use ! to access a non-existent optional value triggers a runtime error. Always make sure that an optional contains a non-nil value before using ! to forc...
<ios><swift><swift2>
2016-01-06 08:54:21
HQ
34,629,085
How to output the name in their id
I have a problem, I want that each id in the foreign key can output the name instead of their id. [Here's the image][1] Here's my code : <table class="altrowstable" data-responsive="table" > <thead > <tr> <th> IDno</th> <th> Lastname </th> <th> Firstname </...
<php>
2016-01-06 08:58:35
LQ_EDIT
34,629,249
Inject namespace experimental to std
<p>Is it bad or good parctice to inject namespace <code>std::experimental</code> into <code>std</code> like following?</p> <pre><code>namespace std { namespace experimental { } using namespace experimental; } #include &lt;experimental/optional&gt; int main() { std::optional&lt; int &gt; o; return 0; } </...
<c++><c++11><stl><c++14>
2016-01-06 09:08:24
HQ
34,629,261
Django render_to_string() ignores {% csrf_token %}
<p>I am trying to perform unit tests in Django. I have the following form in <code>index.html</code>:</p> <pre><code>&lt;form method=POST&gt; {% csrf_token %} &lt;input name=itemT&gt; &lt;/form&gt; </code></pre> <p>And I am testing if the view render the template correctly:</p> <p>views.py</p> <pre><code>def ho...
<django>
2016-01-06 09:09:07
HQ
34,629,362
C++ - create new constructor for std::vector<double>?
<p>I have written a custom container class which contains a <code>std::vector&lt;double&gt;</code> instance - works nicely. For compatibility with other API's I would like to export the content of the container as a <code>std::vector&lt;double&gt;</code> copy . Currently this works:</p> <pre><code>MyContainer cont...
<c++>
2016-01-06 09:15:08
HQ
34,629,387
Checking the value of a key in an hasmap
I would like to know how to check the value of a specific key in an hashmap, for example, if the hashmap "map" contains the key "Key" then what is the value of the key "Key"?
<java><dictionary><hashmap><key-value>
2016-01-06 09:17:00
LQ_EDIT
34,629,424
how to load bitmap directly with picasso library like following
<pre><code>Picasso.with(context).load("url").into(imageView); </code></pre> <p>Here instead of url i want bitmap how can i achieve this. like below-</p> <pre><code>Picasso.with(context).load(bitmap).into(imageView); </code></pre>
<picasso>
2016-01-06 09:18:44
HQ
34,629,540
TaskStackBuilder.addParentStack not working when I was building a notification
<p>I did everything as the official docs writes.But when i navigate backwards,the MainActivity(parent) doesn't open.Instead, the application closes.</p> <p><strong>here is my code:</strong></p> <pre><code>Intent resultIntent = new Intent(context, TestActivity.class); TaskStackBuilder stackBuilder = TaskStackBuilder....
<android><notifications><taskstackbuilder>
2016-01-06 09:25:28
HQ
34,629,574
Can bash script be written inside a AWS Lambda function
<p>Can I write a bash script inside a Lambda function? I read in the aws docs that it can execute code written in Python, NodeJS and Java 8.</p> <p>It is mentioned in some documents that it might be possible to use Bash but there is no concrete evidence supporting it or any example</p>
<bash><amazon-web-services><aws-lambda>
2016-01-06 09:27:23
HQ
34,630,253
c# adding a string to an array
<p>i want to simply add a string to an array, like this:</p> <pre><code>string[] arrayName = new string[0]; arrayName.Add("raptor"); </code></pre> <p>But this doesn't work, can someone help me?</p>
<c#><arrays>
2016-01-06 09:59:26
LQ_CLOSE
34,630,552
Why This Query Not Work Properly
why this query not show more than one data.even I have 10/12 data but this line only show 1.check I have limit it 3 but it show only 1 $getAds=mysql_query("SELECT * FROM advertises WHERE status='RUNNING' AND adult='0' AND (country LIKE '%$test%' OR country='ALL') AND (device LIKE '%$pabu%' OR device='ALL') ORDER BY ra...
<php><mysql>
2016-01-06 10:14:44
LQ_EDIT
34,630,669
Python: ImportError: No module named 'HTMLParser'
<p>I am new to Python. I have tried to ran this code but I am getting an error message for ImportError: No module named 'HTMLParser'. I am using Python 3.x. Any reason why this is not working ?</p> <pre><code>#Import the HTMLParser model from HTMLParser import HTMLParser #Create a subclass and override the handler me...
<python-3.x>
2016-01-06 10:20:20
HQ
34,631,634
Oracle data types variations
<p>I'm a new beginner to Oracle ,I'm so confused about the data types .</p> <hr> <p>I don't know the difference between :</p> <ul> <li><code>INT</code>,<code>INTEGER</code>,<code>NUMBER</code></li> <li><code>CHAR</code>,<code>CHAR VARYING</code> ,<code>CHARACTER</code>,<code>CHARACTER VARYING</code></li> </ul>
<sql><database><oracle><oracle11g>
2016-01-06 11:08:05
LQ_CLOSE
34,631,806
Fail during installation of Pillow (Python module) in Linux
<p>I'm trying to install Pillow (Python module) using pip, but it throws this error:</p> <pre><code>ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting </code></pre> <p>So as the error says, I tried:</p> <pre><code>pip install pillow --global-option="--disable-jpeg" </code></pre> ...
<python><linux><pillow>
2016-01-06 11:16:29
HQ
34,631,956
Encryption in URL
<p>I have an URL. My URL type: "<a href="http://myweb.com/id=W5OAGejZ1HpuHri7BB1c%2BXHSYs2c47eyJFhpmroalPXZ5SUIgeUbqu7hJUVFVwPOA0xRI3ILJVHQ5QgBwtWpE1x0%2Fq10VVrmduMU5PiYguW1cXog4azzDvjcbb3%2BVpMDKe5QmvjLgJ9M4TXosTYR%2FOVzIPvXD%2BjeTEFtIM2g6siUcPBOeK5ubQh1QYB%2FCSbgnFsh2mpx3r%2FXBXI09I4q%2Be7hDSITcyIeYzFf1LoovBKotYcYSxh...
<php><encryption>
2016-01-06 11:23:53
LQ_CLOSE
34,632,845
Relative import error with py2exe
<p>I was trying to generate an executable for a simple Python script. My setup.py code looks like this:</p> <pre><code>from distutils.core import setup import py2exe setup(console=["script.py"]) </code></pre> <p>However, I am getting the error shown in the screenshot. Is there something I could try to fix this? I am ...
<python><py2exe><relative-import>
2016-01-06 12:11:00
HQ
34,632,959
Redirecting command output in docker
<p>I want to do some simple logging for my server which is a small Flask app running in a Docker container.</p> <p>Here is the Dockerfile</p> <pre><code># Dockerfile FROM dreen/flask MAINTAINER dreen WORKDIR /srv # Get source RUN mkdir -p /srv COPY perfektimprezy.tar.gz /srv/perfektimprezy.tar.gz RUN tar x -f perfek...
<linux><bash><logging><docker><output>
2016-01-06 12:16:21
HQ
34,633,308
How to pass parameters to AWS Lambda function
<p>I know that it is possible to pass parameters to a Java program running on AWS Lambda in order to test it. But I do not know how to pass those parameters if this program gets called by a schedule event.</p> <p>Does anyone know if this is possible? If yes, how? I was not able to find anything about it.</p> <p>Thank...
<java><amazon-web-services><aws-lambda>
2016-01-06 12:35:37
HQ
34,633,805
Add Remote option not shown in PyCharm
<p>I am trying to set up a remote debugger with PyCharm on a Vagrant Machine. I am following <a href="https://www.jetbrains.com/pycharm/help/configuring-remote-interpreters-via-ssh.html">this</a> PyCharm tutorial. However, the Add Remote option is not available for me. Just Add local and Create VirtualEnv.</p> <p>Any...
<python><debugging><pycharm><remote-debugging>
2016-01-06 12:59:36
HQ
34,634,040
jQuery image scrolling, selecting and lightbox-like-fx
<p>I have a webpage in which I need to realize something that looks like the following sketch: <a href="https://i.stack.imgur.com/iZN5A.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iZN5A.jpg" alt="sketch"></a></p> <p>As you can see, there are basically two sections:</p> <ul> <li>a side-block (pr...
<javascript><jquery><html><css><jquery-plugins>
2016-01-06 13:12:14
LQ_CLOSE
34,634,366
Android ActionBar Backbutton Default Padding
<p>I am creating a custom <code>ActionBar</code> using a <code>RelativeLayout</code> with an <code>ImageButton</code> to the left to <strong>replace</strong> it. I have downloaded the Back icon from google's website to use on the <code>ImageButton</code></p> <p>The problem is that I need to create a Back button to rep...
<android><android-layout><android-actionbar><android-toolbar>
2016-01-06 13:30:18
HQ
34,634,637
How can I extract price of mobile phone from different ecommerce websites in php
<p>How can I extract price of <strong>mobile</strong> phone from different ecommerce websites in php tell me code</p>
<php><html><css>
2016-01-06 13:44:54
LQ_CLOSE
34,634,659
How to properly autostart an asp.net application in IIS10
<p>I'm trying to get my ASP.NET application to automatically start whenever the application pool is running.</p> <p>As per the lots and lots of references online I have already done the following:</p> <ul> <li>Set the Application Pool to <code>StartMode=AlwaysRunning</code></li> <li>Set the site in question (that bel...
<asp.net><iis><autostart>
2016-01-06 13:45:43
HQ
34,635,269
How to pass @Input() params to an angular 2 component created with DynamicComponentLoader
<p>The DynamicContentLoader docs don't explain how I can properly load a child component's inputs. Let's say I have a child like:</p> <pre><code>@Component({ selector: 'child-component', template: '&lt;input type="text" [(ngModel)]="thing.Name" /&gt;' }) class ChildComponent { @Input() thing : any; } </code></pr...
<angular>
2016-01-06 14:15:15
HQ
34,635,588
How do I remove outline on link click?
<p>When I click a link on my website it is creating an outline around the link like so</p> <p><a href="https://i.stack.imgur.com/d7IrT.png" rel="noreferrer"><img src="https://i.stack.imgur.com/d7IrT.png" alt="enter image description here"></a></p> <p>I've tried adding:</p> <pre><code>a.image-link:focus { outline: 0;...
<html><css><hyperlink><outline>
2016-01-06 14:31:38
HQ
34,636,001
iOS - How to ignore the duplicates in NSMutableArray.
<p>For example I have an array = [12,13,13,13,14,15,16,16,17];</p> <p>and my output will be 12,13,14,15,16,17.</p> <p>Please help me on this.</p>
<ios>
2016-01-06 14:50:48
LQ_CLOSE
34,636,191
unable to pass the context to the another class in android
[enter image description here][1]ServiceCalls serviceCalls = new ServiceCalls(this, "ks"); serviceCalls.execute(requestParams); [1]: http://i.stack.imgur.com/DTjw1.png Note:pls check the image.I am not good at english.thanks in advance
<android>
2016-01-06 14:59:39
LQ_EDIT
34,636,423
syntax error, unexpected end of file in ... on line 31
<p>I didn't have any code here on line 31 in this code so what do you think what's the problem here? :)</p> <pre><code>&lt;?php require('config.php'); if(isset($_POST['submit'])) { $uname = mysqli_real_escape_string($con, $_POST['uname']); $pass = mysqli_real_escape_string($con, $_POST['pass']); $sql = mysqli_quer...
<php><mysqli>
2016-01-06 15:11:18
LQ_CLOSE
34,636,644
Creating a Program to pick out random strings from an array
<p>So, i wanted to create a program that picks out simple strings from an array, it sounded pretty simple to me but then i ran into problems. Here's what i wrote:</p> <pre><code>int pickjob; string jobs[] = {Police Officer, Fireman, Vet, Doctor, Nurse, Chemist, Waiter}; job1 = jobs[rand()%7]; job2 = jobs[rand()%7]; jo...
<c++><arrays>
2016-01-06 15:21:10
LQ_CLOSE
34,637,034
Curl -u equivalent in HTTP request
<p>I've been trying to plug into the Toggl API for a project, and their examples are all using CURL. I'm trying to use the C# wrapper which causes a bad request when trying to create a report, so I thought I'd use Postman to try a simple HTTP request.</p> <p>I can't seem to get the HTTP request to accept my API Token ...
<http><curl>
2016-01-06 15:41:27
HQ
34,637,035
Are global static variables within a file comparable to a local static variable within a function?
<p>I know declaring a global variable as STATIC will make it visible to the current file. Does the variable retain its data every time functions are called within the file?</p> <p>For example,</p> <p>Let's say some file calls func1() below, which modifies the static global variable data and then calls func2() which m...
<c><variables><static><global>
2016-01-06 15:41:29
LQ_CLOSE
34,637,162
I wants to add images in repeatbox
i m new in smartface.io software.I wants to add images in repeatbox, can someone help me to add images in repeatbox. Thanks
<image><smartface.io>
2016-01-06 15:48:48
LQ_EDIT
34,637,657
It's possible ignore child dependency in Composer config?
<p>When I run composer install, it will install all my "require" and the "require" of the other package.</p> <p>My composer.json</p> <pre><code>{ "name": "my_app", "require": { "some/package": "0.0.0" } } </code></pre> <p>The "child" dependency</p> <pre><code>{ "name": "some/package", "r...
<composer-php>
2016-01-06 16:13:26
HQ
34,637,896
gitk will not start on Mac: unknown color name "lime"
<p>I've installed git on a mac via <code>brew install git</code>. When I try to start gitk I get the following error:</p> <pre><code>Error in startup script: unknown color name "lime" (processing "-fore" option) invoked from within "$ctext tag conf m2 -fore [lindex $mergecolors 2]" (procedure "makewindow" ...
<gitk>
2016-01-06 16:27:12
HQ
34,638,462
Using git with ssh-agent on Windows
<p>I'm on Windows. I installed git and posh-git (some helpers for Windows PowerShell). I can add keys with <code>ssh-add</code> and can authenticate with github and my webserver. I can also use git from the PowerShell to interact with my repositories.</p> <p>But there is one thing I can't do: I use git-plus for the At...
<git><powershell><ssh><atom-editor><ssh-agent>
2016-01-06 16:55:24
HQ
34,638,895
iOS app rejected due to copyright issues
<p>an app I have been working on got rejected by Apple, here is the message I got from Apple when it got rejected:</p> <p>From Apple 22.2 - Apps that contain false, fraudulent or misleading representations or use names or icons similar to other Apps will be rejected </p> <p>22.2 Details Your app or its metadata ...
<ios>
2016-01-06 17:18:38
LQ_CLOSE
34,640,598
grab all observations from a data set that are present in a second data set based on a linker ID using %in% function R
<p>So, say I have two data sets: </p> <pre><code>d1&lt;- data.frame(seq(1:10),rnorm(10)) colnames(d1) &lt;- c('id','x1') d2&lt;- data.frame(seq(3:7),rnorm(5)) colnames(d2) &lt;- c('id','x2') </code></pre> <p>Now, say I want a new dataset, <code>d3</code>, that is the data from <code>d1</code> with values of <code>id...
<r>
2016-01-06 18:53:54
LQ_CLOSE
34,641,003
Error checking TLS connection: Error checking and/or regenerating the certs
<p>After I restarted my windows i cannot connect to docker machine running in Oracle Virtual Box. When i start Docker QuickStart Terminal every thing looks fine, it's coming up OK and it gives me this message:</p> <pre><code>docker is configured to use the default machine with IP 192.168.99.100 For help getting starte...
<docker><docker-machine>
2016-01-06 19:17:00
HQ
34,641,032
syntax error, unexpected (T_IF)
<p>Parse error: syntax error, unexpected 'if' (T_IF) on line 4</p> <p>I really don't know what is wrong with my code or why this is happening because I am new to PHP.</p> <p>Line 4 is: if($passcheck == $mypass){</p> <pre><code> &lt;?php $mypass="DaPigeon123"; $passcheck=$_POST["password"] if($passchec...
<php><if-statement><syntax>
2016-01-06 19:19:17
LQ_CLOSE
34,641,659
Generic composable Ecto query w/ dynamic field name in query expression
<p>I'm trying to allow for passing in a field name and running it in an Ecto query expression dynamically, like so:</p> <pre><code>def count_distinct(query, field_name) when is_binary(field_name) do query |&gt; select([x], count(Map.fetch!(x, field_name), :distinct)) end </code></pre> <p>However, I get this compi...
<elixir><ecto>
2016-01-06 19:56:23
HQ
34,642,165
This application's bundle identifier does not match its code signing identifier
<p>When I try to build and run the app on the device I get following error <code>App installation failed: This application's bundle identifier does not match its code signing identifier.</code></p> <p>I checked the signing certificates, bundle ids, provision profile, entitlements and everything is correct. </p> <p><a...
<xcode><swift><ios9><code-signing>
2016-01-06 20:29:08
HQ
34,642,506
What is the '1995-12-17T03:24:00' for of a datetime called?
<p>I'm trying to to create a method that returns a random date in that format in the from today to a year ago. So right now I have</p> <pre><code>var curDate = new Date(), oneYearAgo = curDate-365*24*60*60*1000, randDate = new Date(Math.random() * (CurDate - OneYearAgo) + OneYearAgo); </code></pre> <p>But no...
<javascript><algorithm><datetime>
2016-01-06 20:50:13
LQ_CLOSE
34,642,947
How to use Domain Transform Edge-Preserving technique for Image Enhancement in Matlab
I am interested in using this Domain Transform Edge-Preserving Video filtering technique (http://inf.ufrgs.br/~eslgastal/DomainTransform/ - source code available there) for image enhancement in Matlab (2015a). At around 3:12 on a 5-minute video (on the site linked above), they perform detail enhancement. I'm not sur...
<matlab><filter><dns><transform><edge-detection>
2016-01-06 21:17:56
LQ_EDIT
34,643,800
How to build a release version of an iOS framework in Xcode?
<p>Let's say I do the following:</p> <ol> <li>Open Xcode 7</li> <li>File | New | Project | Cocoa Touch Framework</li> <li>Create "TestFramework" with the Swift language</li> <li>Create a file Hello.swift with public func hello() { print("Hello") }.</li> </ol> <p>From here, I can build a debug build of the framework (...
<ios><xcode><frameworks><release>
2016-01-06 22:11:17
HQ
34,644,113
Msg 201, Procedure stp_DespatchedJob, Line 0 Procedure or Function 'stp_DespatchedJob' expects parameter '@jobId', which was not supplied
USE [taxi] GO DECLARE @return_value int EXEC @return_value = [dbo].[stp_DespatchedJob] @JobStatusId = NULL SELECT 'Return Value' = @return_value GO
<sql><sql-server>
2016-01-06 22:31:13
LQ_EDIT
34,644,117
Golang struct inheritance not working as intended?
<p>Check out <a href="https://play.golang.org/p/elIHgHAZjT" rel="noreferrer" title="this sandbox">this sandbox</a></p> <p>When declaring a struct that inherits from a different struct:</p> <pre><code>type Base struct { a string b string } type Something struct { Base c string } </code></pre> <p>Then...
<go>
2016-01-06 22:31:35
HQ
34,644,264
Where are the additional command line options in Android Studio version 1.5.1 for the emulator
<p>After the latest update to AS, the emulator's additional command line options are missing. I use this primarily for -http-proxy and -scale commands. Any help in locating these options, or it's replacement, would be appreciated.</p>
<android><android-studio><command-line><android-emulator><http-proxy>
2016-01-06 22:43:38
HQ
34,645,131
How do I run PhantomJS on AWS Lambda with NodeJS
<p><em>After not finding a working answer anywhere else on the internet, I am submitting this ask-and-answer-myself tutorial</em></p> <p>How can I get a simple <code>PhantomJS</code> process running from a <code>NodeJS</code> script on <code>AWS Lambda</code>? My code works fine on my local machine, but I run into di...
<node.js><amazon-web-services><phantomjs><aws-lambda>
2016-01-06 23:59:08
HQ
34,645,274
EF query to Oracle throwing "ORA-12704: character set mismatch"
<p>I'm trying to combine a few columns in EF from Oracle then do a <code>.Contains()</code> over the columns like this:</p> <pre><code>public IEnumerable&lt;User&gt; SearchUsers(string search) { search = search.ToLower(); return _securityUow.Users .Where(u =&gt; (u.FirstName.ToLower() + " " + u.La...
<c#><.net><oracle><entity-framework>
2016-01-07 00:15:12
HQ
34,645,315
How to apply css class to a component element when it's created by router-outlet?
<p>I have DOM that looks something like this:</p> <pre><code>&lt;app&gt; &lt;router-outlet&gt;&lt;/router-outlet&gt; &lt;project&gt;...&lt;/project&gt; &lt;/app&gt; </code></pre> <p>where <code>project</code> element is inserted by the router.</p> <p>How do I add a class to this element?</p>
<angular><angular2-routing>
2016-01-07 00:19:16
HQ
34,645,537
Android Espresso not working with Multidex gives "No tests found"
<p>My Espresso tests were running until I had to support multidex.</p> <p>My build.gradle, I have</p> <pre><code>minSdkVersion 14 targetSdkVersion 23 multiDexEnabled = true testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner" androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2...
<android><android-espresso><android-multidex>
2016-01-07 00:45:22
HQ
34,645,731
Export more than one variable in ES6?
<p>I'm trying to export more than one variable in ES6:</p> <p>exports.js</p> <pre><code>var TestObject = Parse.Object.extend('TestObject') var Post = Parse.Object.extend('Post') export default TestObject export Post </code></pre> <p>main.js:</p> <pre><code>import TestObject from '../store' import Post from '../sto...
<javascript><ecmascript-6><vue.js>
2016-01-07 01:08:18
HQ
34,646,007
Only allow form submit of pdf/images not ever blank
<p>Hi I have a website which the page logic should only accept submit under two conditions:</p> <p>1) if the captcha is actively checked</p> <p>and </p> <p>2) if at least one file is attached (only pdf and image file types are allowed up to three total) are attached. </p> <p>the issue is that we are receiving blank...
<javascript><php><html><wordpress>
2016-01-07 01:40:09
LQ_CLOSE
34,646,021
RestFuse vs Rest Assured vs MockMVC Rest Service Unit Test Framework
<p>I've been trying to find a simple all purpose unit test framework for Spring MVC based Rest Services I've written.</p> <p>I've been searching online and narrowed it down to:</p> <ul> <li>RestFuse (<a href="http://developer.eclipsesource.com/restfuse/" rel="noreferrer">http://developer.eclipsesource.com/restfuse/</...
<rest><spring-mvc><rest-assured><mockmvc><restfuse>
2016-01-07 01:41:40
HQ
34,646,221
How to get alpha names for my program?
<p>When you see games in BETA and ALPHA, lets use Minecraft as example, Minecraft when it was in ALPHA the title for the ALPHA versions for Minecraft where like "Minecraft APLHA C1.2.2_C1.2" for example. Not that it's really important but how do they get the numbers and letters (C1.2.2_C1.2 &lt;- these numbers and lett...
<minecraft>
2016-01-07 02:03:54
LQ_CLOSE
34,646,709
how to change query to entity frame
i want to change this sql query to entity frame query SELECT dbo.ClassTiming.StartTime, dbo.ClassTiming.EndTime, dbo.Employee.StaffName, dbo.Department.DepartmentName, dbo.Class.ClassName, dbo.Section.SectionName, dbo.WeekDay.DayName FROM dbo.Timetable INNER JOIN ...
<c#><sql-server><entity-framework>
2016-01-07 03:02:53
LQ_EDIT