input stringlengths 51 42.3k | output stringlengths 18 55k |
|---|---|
Unauthorized error 401 GCM error <p><em>Note, this question should be materially different from other questions with a similar name because of the fact that the API seems to have changed significantly over the past few years.</em></p>
<p>I am trying to send a push notification to an iOS device using GCM.</p>
<p>I hav... | <p><strong>Update</strong>: There is now a visible note in the <a href="https://developers.google.com/cloud-messaging/http-server-ref#error-codes" rel="nofollow">GCM docs</a> saying:</p>
<blockquote>
<p>Starting from Sept. 2016 new server key can only be created in the Firebase Console using the <a href="https://con... |
Call a radio button that is not selected <p>I have a program/website. It has radio buttons in it and I am using VS 2015. I am using the code behind for aspx for the page_load. When a person select a radio button, I use Request["radiobuttonname"] to get the value that the user selected.</p>
<p>My question is, how do I ... | <p>Try:</p>
<pre><code>var radios = document.querySelectorAll('input[type=radio]');
var nonSelectedRadios = [];
for (var i = 0; i < radios.length; ++i) {
if (!radios[i].checked) nonSelectedRadios.push(radios[i].value);
}
console.log(nonSelectedRadios); // ["NO", "I'D RATHER NOT TELL"]
</code></pre>
<p>That way ... |
html-webpack-plugin not inject js file into index.html when using webpack-dev-server <p>Here is my webpack config :</p>
<pre><code>var path = require('path');
var webpack = require('webpack')
var HtmlWebpackPlugin = require('html-webpack-plugin')
var fs = require('fs'),buildPath='./dist/';
var folder_exists = fs.exist... | <p>You can try config like this..</p>
<pre><code>new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
})
</code></pre>
<p>and Index.html</p>
<pre><code><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-comp... |
How to pass input params in node js for joining collections? <p>My requests collection,</p>
<pre><code>{
"_id" : ObjectId("57e0b8cd5eeba5140b270ca8"),
"sent_id" : "57dfcdc21ad7cf658860926d",
"recieved_id" : "57dfcddf1ad7cf658860926e",
"status" : 1
}
</code></pre>
<p>My profile collection</p>
<pre><code>... | <ol>
<li><p>John's ID is <code>57dfcddf1ad7cf658860926_e_</code>, which is NOT equal to the request.sent_id <code>57dfcdc21ad7cf658860926_d_</code>. Hence no join.</p></li>
<li><p>You need to add a <code>$match</code> clause to the aggregate() call</p>
<p>$match: {sent_id: params.id}</p></li>
</ol>
|
How can I print all of the values of the nodes in my singly linked list using a while loop, or using the __iter__ magic method? <p>If I have created a linked list of nodes which have a <code>value</code> attribute, is there a way to print all <code>value</code> attributes for all nodes in the linked list using a while ... | <p>You can use a <code>while</code> loop, setting a variable to the head at first and the next node on each iteration:</p>
<pre><code>node = linked_list.head
while node:
print node.value
node = node.next
</code></pre>
<p>A few other suggestions for your implementation:</p>
<p>1) Don't use <code>list</code> a... |
ASP.NET_Sessionid is getting renewed <p>There is a button in my site in which you have to login first. When clicked, it retrieves a report from the ssrs report server and displays it on the same page.
I took note of the session ID it used in the request cookie.</p>
<p><a href="http://i.stack.imgur.com/ZBWfq.png" rel="... | <p>What your describing sounds perfectly normal.</p>
<p>A session ID is essentially a pointer to a virtual memory space that contains a table of variables accessible to that user. The table isn't kept forever-- if the ASP.NET framework doesn't see a session ID for a certain amount of time (say 20 or 30 minutes, depen... |
unable to access custom webpage from mobile device via wifi access point <p>I have a D-Link WiFi AP (<code>192.168.1.0/24</code>), DHCP enabled with default settings. And I have connected my Windows (Windows 10) Laptop with my WiFi AP (<code>192.168.1.11/24</code>), my PC connected with AP and got the IP from DHCP as <... | <p>I have installed an Antivirus program in my PC and then It worked fine. I really don't have idea why it did't work earlier. But, what I have noticed is while I starting up the tomcat instance, firewall(Antivirus) popped up and asking for permission to access port 8080. After that, it was working as expected. </p>
|
Swift Attributed Title Syntax <p>I'm trying to do something like this:</p>
<pre><code>let introText = "This is sample "
let facebookText = "Text"
loginButton.setTitle("\(introText)\(facebookText)", forState: .Normal)
loginButton.addAttribute(NSFontAttributeName, value: UIFont(name: "Arial", size: 15.5)!, range: NSMake... | <p>If you are looking for an attributed text with bolded part, this will do it for you.</p>
<pre><code>extension String {
func getPartOfStringBold(boldPart:String)-> NSAttributedString{
return getPartOfStringBold(boldPart, font: UIFont(name: "Taz-Bold", size: 13)!)
}
//Make your string bold
func getPartO... |
What is the difference between develop vs. feature branch type? <p>I read few articles about Git flow best practices. There are many types of git branch (for example: [1], [2]):</p>
<pre><code>+ Master
+ Develop
+ Feature
+ Bug
+ Proof of concept
+ Release
+ Hotfix
</code></pre>
<p>What is the difference between type... | <p>The difference between <code>master</code> and <code>release</code> is that the <code>master</code> branch is what your customers/users are using. It is the branch actually installed or sold.</p>
<p>In a lot of teams the <code>master</code> branch (usually also named <code>master</code>) is also the <code>release</... |
Remove sudo command usage <p>I am tehcnically administrator on my mac mini, on the initial installion of Ionic dependency I am using sudo command. Now of file associated with this framework have permission issue. This shouldn't be problem as I am administrator</p>
<p>I am kindly asking you guys, has anyone know how to... | <p>If you installed Ionic following the directions from the two pages below, then you shouldn't need to use <code>sudo</code> after the installation:</p>
<p><a href="http://ionicframework.com/docs/guide/installation.html" rel="nofollow">http://ionicframework.com/docs/guide/installation.html</a>
<a href="http://ionicfr... |
Can we use cached RDD across batches on an executor <p>I have a case where I want to download some data from a remote store every one hour and store that as Key-Value pairs in a RDD on an executor/worker. I want to cache this RDD so that all future jobs/tasks/batches running on this executor/worker can use the cached R... | <p>Alluxio is a memory-centric distributed storage system. Alluxio can be used to cache Spark RDDs in memory, for multiple and future Spark applications and jobs to access.</p>
<p><a href="http://www.alluxio.com/2016/08/effective-spark-rdds-with-alluxio/" rel="nofollow">Spark can store RDDs in Alluxio memory</a>, and ... |
mobile keyboard change viewport html <p>A known problem if u r using percentage (or viewport unit) width and height for <code><body></code> is that when mobile keyboard invoke due to input the size of any percentage/viewport element will change .</p>
<p>i've searched alot about this problem and nothing could rea... | <p>Use javascript/jquery to set the height and width for <code><body></code> in px .</p>
<p>using this code :</p>
<pre><code>$(function() {
var w = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
var h = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
... |
Temporary tables used in stored procedure? <p>I want to get the count of how many <code>temporary</code> tables are used in a <code>stored procedure</code>.</p>
<p>Thanks in advance</p>
| <p>Here is an algorithm to make this work for you:</p>
<ol>
<li>Get the text of the stored proc from <code>Information_Schema.Routines</code> from the routine_definition column </li>
</ol>
<p><code>Declare @Def VarChar(Max) = ''
Select @Def = @Def + Routine_Definition
From Information_Schema.Routines</code></p>
<o... |
Issues when trying to copy one char array to another (without using already existing functions) <p>I am currently stuck on copying one char array to another char array. When I try to do so I end up cutting off most of one array and receiving "ed." as a result which is the last 3 characters of my arr2[]. I am not allowe... | <blockquote>
<p>When I try to do so I end up cutting off most of one array and receiving "ed." as a result</p>
</blockquote>
<p>This happens since you are incrementing both the variables in <code>Copy</code> AND you are not null terminating <code>cloud</code>.</p>
<p>My suggestion: use array indexing to copy the ar... |
How to write grok for this log file <p>I'm trying to figure out a grok pattern for the logfile below. It contains 1 line of Success log and 1 entry of Warning log. </p>
<pre><code>2016-09-03T12:53:31-04:00 DEV SampleFileService INFO 512132:414618:SampleFileService-2-FTS EXECUTING: Error Handling Client Reques... | <p>You'll have to use the multiline <a href="https://www.elastic.co/guide/en/logstash/current/plugins-filters-multiline.html" rel="nofollow">filter</a>/<a href="https://www.elastic.co/guide/en/logstash/current/plugins-codecs-multiline.html" rel="nofollow">codec</a> on your input so all of your message is grouped togeth... |
Android AutoCompleteTextView onItemSelectedListener not triggered with a bluetooth keyboard <p>I have a simple app that contains just an <code>AutoCompleteTextView</code> (code below). I have the <code>OnItemClickListener</code> and <code>OnItemSelectedListener</code> defined. Clicking on the individual items from the ... | <p>You should use <a href="https://developer.android.com/reference/android/view/View.html#setOnFocusChangeListener(android.view.View.OnFocusChangeListener)" rel="nofollow">onFocusChangeListener</a> for this. On onItemSelectedListener is for selectable views (like the ones in listview).</p>
|
Neo4j - get movie recommendation based on tags <p>I want to Find movies whose search tag contains the tags of movie , watched by me. Following is my query but it is not producing expected result , can anybody please let me know what is wrong with this query ?</p>
<pre><code>MATCH (m:Movie)-[:HAS_TAG]->(t:Tag)
W... | <pre><code>// Collect all films and tags that apply to films that are watched by:
//
MATCH (p:Person {personId : '50'})
WITH p
MATCH (p)-[:WATCHED]->(m:Movie)-[:HAS_TAG]->(t:Tag)
WITH p, collect(distinct m) AS movies, collect(distinct t) AS tags
//
// And get recommendation:
//
MATCH (m:Movie)-[:HAS_TAG]->(t:T... |
Fabric always shows app update is available <p>I have been using fabric since long time now. But since first I have started using I have been facing a issue and till the date have tried to search many times but never got any solution.</p>
<p>I use Mac to build android apps and when I send that apps on fabric for testi... | <p>Ok, Finally found solution, Basically it works fine if we just build the APK using Build command or option from menu and then send via fabric, it do not work if we send APK which was generated from Build and run.</p>
|
WooCommerce issue - Returning only integer part of sizes for products <p>In WooCommerce, for example, I have a product with defined width = '1.75' and height = '15.75'.</p>
<p>I use the following function:</p>
<pre><code>$product = new WC_Product($id);
public function get_sizes($product) {
$w_size = floatval($prod... | <p>I have make a test setting a product with your dimensions in woocommerce <em>(in my case this product have the ID 99)</em>. here is the screen shot of the settings:</p>
<p><a href="http://i.stack.imgur.com/Acqi8.png" rel="nofollow"><img src="http://i.stack.imgur.com/Acqi8.png" alt="enter image description here"></a... |
Watson Conversation API response inconsistent with workspace response on Watson web console <p>I built a conversations dialog model that works perfectly when tested on the www.ibmwatsonconversation.com workspace. </p>
<p>However, when I use the API calling the same workspace on my web app, the response given through t... | <p>The most likely cause for this is that you are not passing back the context object at every call. Conversation is stateless, so without the context object it can't determine where you are, and will default to root. </p>
<p>Your first call will create the context object, and you can keep passing that back. </p>
<p>... |
iOS10 UINavigationButton Position different form iOS9 <p>I find is different when I set </p>
<pre><code>UIBarButtonItem *cancelViewButton = [[UIBarButtonItem alloc] initWithTitle:@"cancel" style:UIBarButtonItemStylePlain target:self action:@selector(popCurrentViewController)];
self.navigationItem.rightBarButtonItem = ... | <p>I need to narrow the navigationTitleView</p>
<pre><code>#define iOS10Later ([UIDevice currentDevice].systemVersion.floatValue >= 10.f)
if(iOS10Later) {navigation.titleView = [[SearchBarView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH - 120, 30)];}
</code></pre>
|
How many FLOPs are there in calculating a factorial using math.factorial(n) in python <p>I am trying to understand how many FLOPs are there if I use a certain algorithm to find the exponential approximated sum, specially If I use math.factorial(n) in python. I understand FLOPs for binary operation, so is factorial also... | <p>According to that <a href="http://stackoverflow.com/a/9815339/5847976">SO answer</a> and to the <a href="https://hg.python.org/cpython/file/2145593d108d/Modules/mathmodule.c#l1121" rel="nofollow">C source code</a>, in python2.7 <code>math.factorial(n)</code> uses a naive algorithm to compute the factorial so <strong... |
1.year.from_now is also one day ahead <p>Today's date is 2016-09-19. I add one year to it, and I expect the result to be 2017-09-19. Instead, I get 2017-09-20. One year plus one day ahead. Is this behavior as intended?</p>
<pre><code>$ rails c
2.3.1 :001 > Time.now.to_date.iso8601
=> "2016-09-19"
2.3.1 :002 &g... | <p>If you want get ecactly date with time zones, you can use <code>Time.current</code></p>
<pre><code>1.year.from_now
#=> Wed, 20 Sep 2017 05:38:50 UTC +00:00
Time.current
#=> Tue, 20 Sep 2016 05:39:08 UTC +00:00
</code></pre>
|
Program uploading to LPC 2148 by the time of component assembling <p>I am developing an elevator GLCD display (128*64) with LPC2148 Micro controller, I have done program and PCB designing also. Now I want to upload the program to micro controller, how to do it? Before fixing micro controller or after fixing micro contr... | <p>If I understand correctly you want to program the device without using a bootloader or a JTAG. There is some standalone programmers available for the LPC2148 device. Example <a href="https://www.elnec.com/en/device/Philips/LPC2141+%5BLQFP64%5D/" rel="nofollow">here</a>. This will allow the MCU to be programmed befor... |
Connect Firebase with React Native <p>I'm trying to connect React Native with Firebase. I'm using the following method to connect Firebase.</p>
<pre><code>import * as firebase from 'firebase';
// Initialize Firebase
const firebaseConfig = {
apiKey: "<YOUR-API-KEY>",
authDomain: "<YOUR-AUTH-DOMAIN>",
... | <p>From the <a href="https://firebase.google.com/docs/auth/web/password-auth#sign_in_a_user_with_an_email_address_and_password" rel="nofollow">Firebase documentation</a>:</p>
<pre><code>firebase.auth().signInWithEmailAndPassword(email, password).catch(function(error) {
// Handle Errors here.
var errorCode = error.... |
Why still show Y-axis scrollbar on IE11 When use css zoom? <p>Why does IE11 show Y-axis scrollbar when using css zoom ?</p>
<p>I have tested it on other browser and it works ok(not show Y-axis scrollbar), but IE11 still show Y-axis scrollbar. How can I fix the behaviour in IE11?</p>
<p><a href="https://jsfiddle.net/j... | <blockquote>
<p>How can I fix the behaviour in IE11?</p>
</blockquote>
<p>In your css you can use <code>overflow-y:hidden</code>, this will disable the Y-axis scrollbar. </p>
|
how to extract this array through foreach loop <p>I have a multidimensional array.I want to extract this array through foreach loop and want to display in a unordered list. how to solve this. please help me. i am trying for 2 days but could not get any solution. i think i'm weak in loop.</p>
<pre><code>Array
(
[id] =&... | <p>You need to use the <code>array_column()</code>. First of all you need to loop the array and get the category names, and also you need to get the <code>img_name</code>, for this you have to use the array_column and that function gives you the array of that <code>img_name</code>, so now again loop this new array and ... |
How to retrieve data from DB and turn them to object in my case? <p>I am using postgres <code>row_to_json</code> function to get the data that were stored through <code>JSON.stringify()</code>. However, when I retrieve it and do <code>JSON.parse()</code>, it gave me "<code>unexpected token ,</code>" error message.</p>
... | <p>Looks like the JSON that you retrieved from the query is not of the proper format for it to be parsed. Inorder to avoid this please make sure that the JSON being stored into the DB is of proper JSON format, so that it parsed.If this is not achievable the response obtained from the db has to be modified to proper JSO... |
How to send array of complex objects to another page in PHP? <p>I have an array <code>$batchRequest</code> that looks like this:</p>
<pre><code>array(5) {
[0]=>
array(0) {
}
[1]=>
object(Facebook\FacebookRequest)#18 (9) {
["app":protected]=>
object(Facebook\FacebookApp)#9 (2) {
["id":p... | <p>I don't like sending complex (internal) objects between systems, so I would have created a DTO (data transfer object) with public properties and used that object to send the data to avoid any coupling of objects between services. The DTO could even be of type <code>stdClass</code> if you want to make it simple.</p>
... |
How to throw Business Exception from Web API via HTTP Client <p>I have below exception contract.</p>
<pre><code>public class AdminBusinessException : Exception
{
/// <summary>
/// Gets or Sets Exception Code.
/// </summary>
public string ExceptionCode { get; set; }
/// <summary>
... | <p>Your Web APIs should handle the response using the HTTP conventions and you can include a message in the body.</p>
<p>ex:</p>
<pre><code>Public IHttpActionResult DoSomethingBusiness(int id)
{
if(some error from client)
return BadRequest("some error message here")
return Ok("Everything seems good")
... |
Retrieve old value with validation for dynamic form in laravel <p>I have an issue.</p>
<p>I have dynamic form as per user wants.</p>
<p>Everything is going good except i cannot retrieve old values when validation occurs. What i want is validation message with old input values. The problem is due to dynamic form .</p>... | <p>You can count form inputs in your controller and flash this count in the session.</p>
<pre><code>$count = count($request->input("key_name"));
session()->flash("form_count",$count);
</code></pre>
|
Pre-setting values to Docusign template <p>I am new to Docusign api and I am trying to post values from my form into a template. To be honest, I am not sure if I even created the custom fields properly or if there is some special way to set them into the form other than just creating a text field with a name. </p>
<p>... | <ul>
<li>In your texttabs section, you should be passing in the following parameters at a minimum per tab: tablabel & value. </li>
<li>tablabel is the name of the tab that you have defined on the template. So from what I can tell, you have a text box on your template called Address. So you should put "tablabel":"... |
Concatenating arrays in Julia <p>If the two <code>Int</code> arrays are, <code>a = [1;2;3]</code> and <code>b = [4;5;6]</code>, how do we concatenate the two arrays in both the dimensions? The expected outputs are, </p>
<pre><code>julia> out1
6-element Array{Int64,1}:
1
2
3
4
5
6
julia> out2
3x2 Array{Int... | <p>Use the <code>vcat</code> and <code>hcat</code> functions:</p>
<pre class="lang-rb prettyprint-override"><code>julia> a, b = [1;2;3], [4;5;6]
([1,2,3],[4,5,6])
help?> vcat
Base.vcat(A...)
Concatenate along dimension 1
julia> vcat(a, b)
6-element Array{Int64,1}:
1
2
3
4
5
6
help?> hcat
Bas... |
Issue with dynamic youtube player on Safari <p>I've used a custom youtube player to play youtube videos directly on the website, inside a modal box.</p>
<p>Find the code below:</p>
<p>JS & HTML:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snip... | <pre><code><meta name="apple-mobile-web-app-capable" content="yes">
</code></pre>
<p><strong>Add This Tag In Between head opening headClosing</strong></p>
|
Stuck on create symlink at /etc/service/kibana to /etc/sv/kibana when running kitchen test on CentOS 6.7 <p>my problem here is I got stuck on the kibana create symlink instead of continue running on the the code below which is elasticsearch recipe and logstash recipe. Can anybody know why this is happening cause I don'... | <p>This usually means <code>runsvdir</code> isn't picking up the new service. Check that Runit itself has started correctly from whatever the system init daemon is.</p>
|
How do I pass a message from an object to another object in Free Pascal <p>I have a form and then I have a 'TPageControl' object (named 'MyPages') and a 'TButton' object (named 'MyButton') placed on it at <strong>design time</strong>.
Then I have a new class called 'TTab' which extends 'TTabSheet'. 'TTab' class has a ... | <p>You can find Notification methods all over the LCL sources (and in Delphi as well, of course). A simple example is a TLabeledEdit: this is some kind of "TEdit" which contains a TLabel. If the Label is destroyed the LabeledEdit is notified of this because it must set the reference to the label to nil. Otherwise the d... |
How to show Bootstrap Modal after fire jQuery function <p>How to show <code>Bootstrap Modal</code> after fire <code>jQuery</code> <code>function</code> ?</p>
<p>This is my function</p>
<pre><code>$(".add-to-fav").click(function () {
event.stopPropagation();
event.preventDefault();
... | <p>To show a bootstrap modal do the following</p>
<pre><code>$('#loading-modal').modal('show');
</code></pre>
|
Add 32-bit versions of Qt 5.7 on a 64-bit machine <p>Want to manually <strong>install 32-bit versions of Qt 5.7</strong> so that I will be able to deploy my app to not only 32-bit but 64-bit machines as well. </p>
<p>Initially when I <strong>installed it on my 64-bit Windows 7 machine</strong>, I only selected the 64-... | <p>You have to launch Qt Maintenance Tool : Start -> Programs -> Qt -> Qt Maintenance Tool.</p>
<p>Skip the Qt login (unless you are using a commercial version of Qt).</p>
<p>Select "Add or remove components" and click yes. You'll be able to select other kits to download and install*.</p>
<p>Then Qt Creator should a... |
Retrieving data from shared prefrences <p>I am saving some data in the SharedPreferences, but when I press the back button and again go to profile, the data clears.<br>
How can I keep data stored with the help of SharedPreferences?</p>
<pre><code> package www.edukeen.in.eduaspire;
public class Profile extends A... | <p>Use this maybe it'll help you.</p>
<pre><code>public class SharedPreferenceManager {
String APP_PREF = "APP_PREF";
public void setData(Context context, String key, int value) {
SharedPreferences.Editor editor = context.getSharedPreferences(APP_PREF, Context.MODE_PRIVATE).edit();
editor.putInt(key, value);... |
C to C# PInvoke with structs with pointers <p>I'm trying to create a C# interface which receives a callback from an external C DLL.
The callback's parameters contain pointers to C structs, which themselves have a pointer to a different struct.</p>
<p>The callback signature:</p>
<pre><code>typedef application_event_re... | <p>You will not get help from the marshaller, this normally causes a major memory management problem. But can work in the specific case of a callback since it is the calling C program that manages the data.</p>
<p>You have to convert the data yourself. Declare the pointers as <code>IntPtr</code> and use <code>Marsha... |
Lumia Imaging SDK 3.0 Blending AutoEnhance Effect and other source throw InvalidArgumentException <p>I am trying to blend an existing image with another <code>IImageProvider</code> that has an <code>Effect</code> applied. I noticed there are are several <code>Effect</code>s that throw InvalidArgumentException such as t... | <p>Thanks for reporting this issue.</p>
<p>As <a href="http://stackoverflow.com/users/55377/david-bo%C5%BEjak">David Božjak</a> mentioned, there are some known issues for GPU processing, you might try to set <code>RenderOptions</code> as CPU only.</p>
<pre><code>using (BitmapRenderer bitmapRender = new BitmapRendere... |
App hangs while doing fragment transaction in runOnUiThread <p>In my app, I'm doing a network operation in a thread. In the result of the network operation, I show a toast and replace the fragment using the runOnUiThread() method. But the app gets hanged after the fragment is replaced.</p>
<p>Here is my code</p>
<pre... | <p>Enable strict mode in application and check where your main thread is getting blocked.</p>
|
How does one create a C function pointer from a Scheme function in Guile? <p>I am trying to write a wrapper for a C library that contains a function which takes another function to achieve polymorphism (i.e. a generic function). I would like to write my wrapper such that it takes a Scheme function and passes it to the ... | <p>You have to use <code>procedure->pointer</code> procedure which is described in the <a href="https://www.gnu.org/software/guile/manual/html_node/Dynamic-FFI.html#index-procedure_002d_003epointer" rel="nofollow">manual</a>.</p>
|
how to create project work in online and offline mode in MVC? <p>I want to create a project in MVC that works in online mode and offline mode for example when a user work in offline there is no connectivity of the internet available
then all data stored on the local machine when internet connectivity available then al... | <p>For that, you have to use third party <strong>sync service</strong>/SQL sync/Microsoft sync service etc.</p>
<p>you have to <strong>create</strong> other <strong>project</strong> which run at certain time and <strong>execute your sync process</strong> for local system to Live server database and vice versa.</p>
<p... |
HTML image net::ERR_FILE_NOT_FOUND <p>i am using html image like this </p>
<p>HTML : </p>
<pre><code><div class="home" style="background: #f2f2f2;">
<div class="pr_blank"></div>
<!-- <div id="now" class="show"> -->
<div class="ptgamebox">
<im... | <p>This error means that file was not found.Either path is wrong or file is not present where you want it to be. Try to access it by entering source address in your browser to check if it really is there. Browse the directories on server to ensure the path is correct. You may even copy and paste the relative path to be... |
DateDiff with multiple events Same Column SQL Server <p>Thank you in advance for any assistance you can provide. I am looking to get the date difference between events that are stored in the same column. Referring to the Sample data, I am looking for the differences between the "Partial Submissions" and their respectiv... | <pre><code>DECLARE @Tbl TABLE (RowNumber INT, RecordNumber INT, IDX INT, DESCRIP NVARCHAR(50), DATES DATETIME, EVENTNUM INT)
INSERT INTO @Tbl
VALUES
(1, 11515, 13, 'Partial Submission', '8/12/16 00:21', 3078),
(1, 11515, 14, 'Junior Reviewed', '8/12/16 15:52', 3089),
(2, 11515, 26, 'Partial Submission', '8/18/16... |
scrolling when mouse is hovered over a fixed position div <p>I am having issues scrolling the parent container when the mouse is kept hovered over a child div that is applied <code>position:fixed</code>. It basically stops scrolling the parent when mouse is above the fixed position child.</p>
<p>Here is my code. I nee... | <p>It seems to be working with <code>pointer-events: none;</code> on the <code>.fixed</code> element itself...</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.parent{
... |
Uncaught SyntaxError: Unexpected token in Javascript <p>I am trying to insert hyperlink to my survey i am getting this error in this line var myspan1 = $(âspan[title=âLaptopâ]â); </p>
<pre><code> <script>
$(document).ready( function() {
var myspan1 = $(âspan[title=âLaptopâ]â);
myspan1.append(â... | <p>Use single and double quotes properly. Try this</p>
<pre><code>$(document).ready( function() {
var myspan1 = $("span[title='Laptop']");
myspan1.append("<a target='_blank' style='vertical-align:middle;color:#0072c6' href='@http://doc/IT/IT%20Library/SP_UAT%20Server%20and%20Services%20Error.PNG'> <b... |
How to clear unknown injector error for factory in angularjs <p>I am very new to AngularJs.
while injecting factory we are getting unknown provider error. For form posting i refered this<a href="http://www.bennadel.com/?site-photo=638" rel="nofollow">Ben Nadal</a></p>
<p>Version: AngularJs 1.5.5</p>
<p>Below my contr... | <p>] </p>
<p>is missing in your controller</p>
|
Swift: What is a .swift-version file? <p>I see a lot of projects have this file in their root directory:</p>
<blockquote>
<p>.swift-version</p>
</blockquote>
<p>These are some examples:</p>
<p><a href="https://github.com/hackiftekhar/IQKeyboardManager" rel="nofollow">https://github.com/hackiftekhar/IQKeyboardManag... | <p>It is nothing but gives the version of <strong>Swift</strong>, the project is written in</p>
<p>It is used by Xcode during the building phase to build accordingly.</p>
|
Center text besides custom textbox <p>I have a custom styled checkbox, see this JSFiddle:</p>
<p><a href="https://jsfiddle.net/y58zrd4m/" rel="nofollow">https://jsfiddle.net/y58zrd4m/</a></p>
<p>My HTML looks like this:</p>
<pre><code><label class="checkbox">
<input type="checkbox" />
<span>Lor... | <p>Some changes in your <em>CSS</em> will help you achieve that as:</p>
<h2>Code Snippet</h2>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>.checkbox {
cursor: pointer;
... |
Spring Boot: How to set retry attempts for Oracle Production database connections by external configuration properties in spring.datasource <p>I am new to <code>Spring</code> and I would like set <code>retry attempts</code> for <code>Oracle</code> which is associated with our <code>Spring Boot Java Application</code>. ... | <p>That's a feature of the connection pool. If you have no opinion, <a href="http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-connect-to-production-database" rel="nofollow">we do have one</a>. </p>
<p>You're probably using the Tomcat data source so check <a href="https://tomcat.apache... |
Elasticsearch: After update index analyzer, index need a reindex? <p>If i update index analyzer like synonyms or keywords, i need to reindex the documents?</p>
<p>I notice some strange search result after analyzer update.</p>
| <p>That is correct. Previously indexed data will not reflect the changes as per paragraph 1 <a href="https://www.elastic.co/guide/en/elasticsearch/guide/current/reindex.html" rel="nofollow">here</a>.</p>
|
Use JS Variable in JSON <p>I want to use a JS variable in JSON.</p>
<pre><code>var add = mixItems[i][0] + "," + mixItems[i][1];
jQuery.getJSON("wp-content/plugins/proteinmixer/php/addtocart.php" , function(data){
});
</code></pre>
<p>PHP:</p>
<pre><code>require_once('../../../../wp-blog-header.php');
header('Conten... | <p>You can turn any Javascript value/object into a JSON string by using <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify" rel="nofollow">JSON.stringify()</a>:</p>
<pre><code>var add = mixItems[i][0] + "," + mixItems[i][1];
var jsonAdd = JSON.stringify(add);
</cod... |
What are iPhone 7(new) screen Resolution, Pixel and Size? <p>Apple announced release of iPhone 7 recently.</p>
<p>What are iPhone 7's Screen resolution,pixel and size?</p>
<p>I searched on Google but I can't find any answer for it.</p>
| <p><strong>iPhone 7</strong></p>
<ul>
<li><p>resolution= 750x1334</p></li>
<li><p>Logical resolution: 375x667</p></li>
<li><p>Ppi: 326 ppi</p></li>
<li><p>Aspect ratio: 9:16</p></li>
<li><p>Size diagonal:4.7 inch</p></li>
</ul>
<hr>
<p><strong>iPhone 7 Plus</strong> </p>
<ul>
<li><p>resolution= 1242x2208</p></li>
... |
unexpected behavior during a rotation animation on canvas <p>I've been working on some studies with animation and with the help of some jquery I've created an animation where when a square that is moved by the users mouse through a mousemove jquery event collides with another square on the screen (square2) thats been h... | <p>I think your problem is right here:</p>
<pre><code> draw: function() {
ctx.fillStyle = "white";
ctx.fillRect(this.x, this.y, this.size, this.size)
....
</code></pre>
<p>You are drawing 2nd shape here. Comment this lines and pseudo image should be gone.</p>
|
Sql grouping query <p>I'm stuck with an SQL query. I know <em>what</em> to do but I can't figure out <em>how</em>.
So, here is the scheme needed: </p>
<p>Movie (<strong>title</strong>, <strong>director</strong>, year, genre, rate);</p>
<pre><code>TITLE DIRECTOR YEAR GENRE RATE
Fight club Fi... | <p>Try this query:</p>
<pre><code>SELECT t1.TITLE,
t1.DIRECTOR,
COALESCE(t2.VIDEOSNUMBER, 0) AS VIDEOSNUMBER
FROM Movie t1
LEFT JOIN
(
SELECT v.TITLE, COUNT(DISTINCT r.COLLOC) AS VIDEOSNUMBER
FROM Rent r
INNER JOIN Video v
ON r.COLLOC = v.COLLOC
GROUP BY v.TITLE
) t2
ON t1.TITL... |
How to check values of column in one dataframe available or not in column of another dataframe? <p>I have two dataframes-</p>
<pre><code>df1_data = {'sym1' :{0:'abc a01',1:'pqr q02',2:'xyz y03',3:'mno o12',4:'lmn l45'}}
df1 = pd.DataFrame(df1_data)
print df1
df2_data = {'sym2' :{0:'abc a01',1:'xxx p0',2:'xyz y03',3:'... | <p>You can use <a href="http://pandas.pydata.org/pandas-docs/stable/indexing.html#boolean-indexing" rel="nofollow"><code>boolean indexing</code></a> with <a href="http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.isin.html" rel="nofollow"><code>isin</code></a>, then select by <a href="http://pandas.py... |
ReactJS set state of another class through props callback <p>I am trying to make fullcalendar play nice with ReactJS and Bootstrap modal.
What I want is whenever user choose a date, a bootstrap modal will appear with selected date.</p>
<pre><code>https://jsfiddle.net/16j1se1q/1/
</code></pre>
<p>This is my code</p>
... | <p>ReactJS used to automatically <code>bind</code> the component to the method for you. But with es6 style components you're expected to do it yourself as in:</p>
<pre><code>render() {
return (
<div>
<div is id="calendar" class="bootswatch-flatly"></div>
{this.stat... |
Custom menu in TFS web access (TFS 15) <p>I tried these steps and i created a sample extension similar to this site <a href="https://www.visualstudio.com/en-us/docs/integrate/extensions/get-started/node" rel="nofollow">https://www.visualstudio.com/en-us/docs/integrate/extensions/get-started/node</a> .</p>
<p>But i ne... | <p>Update your extension to below:</p>
<ol>
<li>In the manifest file, update the "uri" of the "contributions" to "tfsReports.html".</li>
</ol>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettypri... |
logging all queries after execution in codeigniter <p>i want to log all queries after execution using hooks.
-i enabled hooks in config.php
-this is my hook--></p>
<pre><code> $hook['post_controller'] = array(
'class' => 'Db_log',
'function' => 'logQueries',
'filename' => 'db_... | <p>Your Code looks fine - the only reason why this doesn't work is in your DB Configuration - take a look @your DB Connection in the database.php under application/config/</p>
<p>There is an option "save_queries" which should be set to true</p>
<pre><code>$db['default'] = array(
...
'save_queries' => TRUE
... |
joda time PeriodFormatter does not print years <p>I have a formatter as below:</p>
<pre><code> private static PeriodFormatter formatter = new PeriodFormatterBuilder()
.printZeroNever()
.appendYears().appendSuffix(" years ")
.appendMonths().appendSuffix(" months ")
.appen... | <p>The underlying problem here is your use of <code>Duration</code> to start with, IMO. A <code>Duration</code> is just a number of milliseconds... it's somewhat troublesome to consider the number of years in that, as a year is either 365 or 366 days (and even that depends on the calendar system). That's why the <a hre... |
How to exclude rows when using a LEFT JOIN (MySQL) <p>I have <strong>users</strong> with many <strong>posts</strong>. I want to build an SQL query that would do the following in 1 query (no subquery), and hopefully no unions if possible. I know I can do this with union but I want to learn if this can be done using only... | <p>Not exists:</p>
<pre><code>SELECT u.*
FROM users u
WHERE NOT EXISTS (
SELECT 1
FROM posts p
WHERE p.user_id = u.id AND p.status = 'approved');
</code></pre>
<p>Or equivalent LEFT JOIN</p>
<pre><code>SELECT u.*
FROM users u
LEFT JOIN posts p
ON p.user_id = u.id AND p.status = 'approved'
WHERE p.user_i... |
How to remove blank line after created menu bar in JavaFX 8? <p><img src="http://s21.postimg.org/58kb4ckyv/2016_09_20_4_11_04.png" alt=""></p>
<p>I'm trying to remove the blank line on the top of window. Below is my class for showing menu bar.</p>
<p>I applied native menu bar by <code>menuLayout.useSystemMenuBarPrope... | <p>Below is the source code that is working:</p>
<pre><code>public void initializeRootLayout() {
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MainApp.class.getResource("view/RootLayout.fxml"));
VBox rootLayout = (VBox) loader.load();
MenuBar menuBar = (MenuBar) ro... |
How to write correct acceptance test for PayPal in-context in Codeception WebDriver? <p>I'm trying to write acceptance test for payment with Paypal Express Checkout with Codeception. The problem is in-context window. How can I switch to that window to fill fields when i don't have window name? Thank you for any help.</... | <p>Solution: </p>
<pre><code>$I->executeInSelenium(function(\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
$handles = $webdriver->getWindowHandles();
$last_window = end($handles);
$webdriver->switchTo()->window($last_window);
});
</code></pre>
|
Can an Android device be damaged if I use it to deploy apps on it using Xamarin? <p>I want to develop Android apps using Visual Studio 2015 and Xamarin. The emulator for Android doesn't work on my laptop beacause of a driver conflict.</p>
<p>I have an Android device that runs Android 6.0 Marshmallow, I've set it up an... | <p>It is not possible to damage hardware from software, so I can say that this part is impossible. (just want to cover everything)</p>
<p>I don't think it is possible to damage the OS, or any other apps, using another app. This is because all the apps are sandboxed:
<a href="https://developer.android.com/training/art... |
What is the substitute for hosting images in google site from Google Drive using Google Apps Script? <p>It was very simple before, simply using the URL <a href="https://googledrive.com/host/" rel="nofollow">https://googledrive.com/host/</a>{file_Id} but, the problem arises because the web page hosting is being disconti... | <h1>Short answer</h1>
<p>You could still use Google Drive to host images, by using the following URL pattern:</p>
<pre><code>https://drive.google.com/uc?export=view&id={fileId}
</code></pre>
<h1>Explanation</h1>
<p>I think that the above pattern was "discovered" by several user by inspecting the download butto... |
Makefile target-based dependencies with a wildcard (compact) <p>I would like to apply the following code in a more compact way:</p>
<pre><code>hello1:
@echo "Hello1"
hello2:
@echo "Hello2"
hello3:
@echo "Hello3"
hello_all: hello1 hello2 hello3
</code></pre>
<p>Is there a way of coding <code>hello_all<... | <p>I don't think there's a native way to do it. Find below a solution specific to your usecase. I think however that it cannot easily be used in a generic way. </p>
<pre><code># The number list that will be used to generate the targets
NUMBERS = 1 2 3 4
# Function that will expand to a custom helloX target, with X t... |
owl carousel navigation hide <p>I use owl carousel and I want the navigation above the slide in order to navigate easily. Now they are hidden or below the slider. I don't know how to put them above. I tried z-index in the <code>CSS</code> for the carousel and navigation but nothing happens. Need help thank you !</p>
<... | <p><code>z-index</code> doesn't put items like you wish it would. I think you need to change positions of these buttons rather than setting different <code>z-index</code>. </p>
<p>Here you have an example of how <code>z-index</code> work. Change <code>z-index</code> as you wish and check how the alignement work on the... |
Conditional row formatting in kendo-ui grid <p>I am using Kendo Grid for displaying. </p>
<pre><code>@(Html.Kendo().Grid<ReportModel>()
.Name("myReport")
.Columns(cols =>
{
columns.Bound(c => c.sNo).Title("S.No.");
columns.Bound(c => c.particulars).Title("Particulars");
}
)
... | <p>There are a few different ways to achieve that:</p>
<p><a href="http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Layout/style-rows-cells-based-on-data-item-values" rel="nofollow">http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Layout/style-rows-cells-based-on-data-item-val... |
Detail Page View not Showing Data in ionic <p>I'm new to Ionic. I write code for list. List is working perfectly but when click on any list-item it's not showing any data.
It showing me this error "Cannot GET /pilliondetails/1" how can i solve this?</p>
<pre><code>app.factory('myService', function() {
var savedData =... | <p>The first thing i noticed is</p>
<pre><code>ui-sref="pilliondetails({pillion.request_id})"
</code></pre>
<p>it should be key-value pair like this</p>
<pre><code>ui-sref="pilliondetails({ your_id : pillion.request_id})"
</code></pre>
<p>and in stateProvider, the url of details page should contain parameter. for e... |
Live/Hot reload not working after adding React Native Map plugin <p>These are my dependencies</p>
<pre><code>"version": "0.0.1",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start"
},
"dependencies": {
"native-base": "^0.5.4",
"react": "15.3.1",
"react-native": "0.32.0",
"rea... | <p>I have <strong>react-native-maps:^0.8.0</strong> installed and Hot Reloading working fine. Make sure you have <strong>JS Dev Mode</strong> is enabled in <strong>Dev Settings</strong>.</p>
|
Getting error clang: error: linker command failed with exit code 1 (use -v to see invocation) while compile C++ file from terminal <p>I'm getting this error</p>
<pre><code>clang: error: linker command failed with exit code 1 (use -v to see invocation)
</code></pre>
<p>while i'm compiling simple cpp file from terminal... | <p><code>gcc hello.cpp</code> should be <code>g++ hello.cpp</code></p>
<p><code>gcc</code> is for compiling and linking C code, while <code>g++</code> is used for C++ code as you have it.</p>
<blockquote>
<p>I think it might conflict with XCode compiler?</p>
</blockquote>
<p>No. The point is that the <code>gcc</co... |
django celery unit tests with pycharm 'No module named celery' <p>my tests work fine when my target is a single function (see 'Target' field in the image):</p>
<pre><code>questionator.test_mturk_views.TestReport.submit
</code></pre>
<p>However, when I specify my target to include all tests within my questionator app:... | <p>with-the-same-problem (most likely me),</p>
<p>I had followed the official <a href="http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html" rel="nofollow">tutorial</a> for getting celery working in my project. They advised the below:
<a href="http://i.stack.imgur.com/gaOE3.png" rel="nofollow"><... |
Recognize newly synchronized files (WinSCP) <p>I am currently working on a parsing application which gets the <code>.csv</code> files first from the remote server and then synchronize it to the local server. After the synchronization, the downloaded files from local path will be parsed and then inserted to SQL database... | <p>So do not enumerate all <code>*.csv</code> files. Enumerate only those that were synchronized/downloaded:</p>
<pre><code>foreach (TransferEventArgs transfer in synchronizationResult.Downloads)
{
string file = transfer.Destination;
...
}
</code></pre>
<p>See the <a href="https://winscp.net/eng/docs/library_... |
Incompatible type for argument and uninitialised in this function <p>I am having an issue with one/two of my methods when I am calling it in <code>main()</code> and I'm unsure why. </p>
<pre><code>int main()
{
struct list * list;
list_init(list);
while(TRUE)
{
struct book book1;
prin... | <p>The basic problem is in your <code>list_init()</code> function. In that function, <code>list</code> is local to the function and any changes made to <code>list</code> itself will not reflected to the caller function argument.</p>
<p><em>Note: C uses pass-by-value for function parameter passing, so any changes made ... |
Can one app access the events of other apps? <p>Is it possible that one app can read the events of another app. For example, if I make an app, would I be able to read the events that are happening in other app?
Thanks</p>
| <p>Try to use broadcast or aidl to do this.</p>
|
A mysterious .html() undefined <p>html:</p>
<pre><code><div id="test1">test1</div>
</code></pre>
<p>js:</p>
<pre><code>console.log($("#test1").html());
</code></pre>
<p>The codes can't be more simple I guess.</p>
<p>I have checked that no any other elements has the id "test1".
jQuery was included in th... | <p>Until you include more of your code we can't be 100% sure, what is probably going on is that your javascript is executed before the whole DOM is loaded and thus it can't find your div, try to wrap it around a ready callback:</p>
<pre><code>$(function() {
console.log($("#test1").html());
});
</code></pre>
|
Possible to get crash when reloadItemsAtIndexPaths called with same indexes? <p>Get a crash at this line when <code>newIndexPath</code> and <code>indexPath</code> are both the same <code>[0, 0]</code>. Is it possible it can cause crash?</p>
<pre><code>case .Move:
self.collectionView!.reloadItemsAtIndexPaths([new... | <p>The error message is clear: You have an instance of UICollectionViewUpdateItem that doesn't understand the message _isCell. Set a breakpoint on Objective-C exceptions to find out where this happens. Doesn't look like there is a problem with reloadItemsAtIndexPaths itself. </p>
|
Xamarin iOS Binding Library View Controller Button Click Crashes Xamarin form App <p>I am creating a xamarin forms app in which a iOS binding library used on a button click in xamarin forms app a ViewController presented from binding library (i.e. declared and defined inside binding library) and in ViewController there... | <p>The issue is due to Xamarin Forms App does not defines UIWindows in AppDelegate file so this issue can be resolved by adding following function in your AppDelegate File.</p>
<pre><code>public override UIWindow Window {
get {
return UIApplication.SharedApplication.KeyWindow;
}
}
</code></pre>
|
Provisioning profile "xyz" doesn't support the Wallet capability <p>Before updating xcode i was working on a project and everything was fine. Now once i updated my Xcode to Version 8.0 The same project keeps on giving me error regarding Code signing i have set the profiles for both debug and release versions and here i... | <p>I had some issues when upgrading to 8 as well, but I solved most of them by deleting Xcode i.e the upgraded one and installing it from scratch.</p>
<p>After this re-authenticate your developer profile from Xcode-> Preferences->Account.</p>
<p>Then re-Download your provisioning profiles again.</p>
<p>All should wo... |
Prepending constructed variable to HTML in JS <p>I started learning web developing for fun a couple weeks ago and I'm creating a rock-paper-scissors game using HTML, CSS and JS. I'm trying to add something to a block of HTML, but failing to do so with my current code. After a lot of googling I decided to try posting my... | <p><code>prepend</code> is a jquery function, create a jquery object</p>
<pre><code>$('#displayPrevRounds').prepend(toAppend);
</code></pre>
|
Android Firebase Cloud Messaging notification failure <p>I am trying to add Firebase Notifications, but it is giving me the following error:</p>
<pre><code>09-20 13:35:33.439 5032-5032/? E/NetworkScheduler.SR: Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
09-20 13:35:34.066 5579-5579... | <p>The Firebase SDK version that you are using has a known bug.<br>
Please update to a more recent version of the library.</p>
<p>in case you still have issues it might be that other libraries are pulling in the bugged version of Firebase sdk.</p>
<p>Check the following answer for more details:<br>
<a href="http://st... |
Calculate Various Centrality using Boost Library <p>I am new to C++. Is there any way of calculating the <a href="https://en.wikipedia.org/wiki/Centrality#Closeness_centrality" rel="nofollow">Closeness Centrality</a>, <a href="https://en.wikipedia.org/wiki/Centrality#Betweenness_centrality" rel="nofollow">Betweenness C... | <p>As far as I know Boost Graph Library only does <a href="http://www.boost.org/doc/libs/1_61_0/libs/graph/doc/betweenness_centrality.html" rel="nofollow">Betweenness</a> (part of <a href="http://www.boost.org/doc/libs/1_61_0/libs/graph/doc/table_of_contents.html" rel="nofollow">Graph Metrics</a>):</p>
<blockquote>
... |
Android fragment not shown if orientation change <p>In my application I've many fragments that can be displayed in portrait and landscape mode, except for one, that I need to be displayed in portrait mode. </p>
<p>Now things works quite well, except for one case:
If the phone is on landscape mode, and I want to displa... | <p>I had some similar issue and in my activity I tried something like this:</p>
<pre><code>@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Fragment currentFragment =
getSupportFragmentManager().findFragmentById(R.id.fragment_container);
... |
login to and access data from a website - postman works <p>i'm trying to login to a website and reach the data that belongs to the loginned user. the website is mubi.com. in postman, i can "post" login information, succesfully login and then "get" the ratings of the people i followed. when i tried on c#, i can login su... | <p>maybe you forgot the Authorization Key?
the login service can be used without this key, because you don't have an Authorization-Token until you login.</p>
<p>ps: sorry for answering, i wantet to comment, but i ain't got 50 reputation yet</p>
|
CustomProperties are not saved in recurring meeting in Outlook add-in using Office.js <p>We are adding a custom property using </p>
<p>customProps.set("otherProp", "value");
customProps.saveAsync(saveCallback);</p>
<p>As mentioned in the documentation, this works fine in a normal meeting but when we do the same in ... | <p>API support between Mac/Windows Outlook different.<br>
Can you mention the outlook version and OS you are seeing problems with ? </p>
|
How to close a blocking socket listening in a thread in while loop? <p>I have a server and client which need to talk bidirectionally, but the problem is when client is waiting for server data, it can not be closed, I have called <code>socket.shutdown()</code> in client <code>closeEvent</code>, but the application doesn... | <p>You should use <code>select</code> function before reading data from socket:</p>
<p>In the program top:</p>
<pre><code>import select
</code></pre>
<p>And the modified <code>listen</code> function:</p>
<pre><code>def listen(self):
while self.isVisible(self):
readable,_,_ = select.select([self.socket],... |
Assign Server policy using command line in newrelic <p>Is there a Command / API in newrelic that can be used to assign a server policy to a server ? I'm trying to write a bootstrap script which would run every time I provision a new server, and I don't fancy going to the newrelic dashboard everytime to change the polic... | <p>You want to use the alert entity API. There is an add capability within that API tree that lets you add an entity (a server or an APM agent etc.) to an existing alert condition. </p>
<p>Add an entity to a condition
To add an entity to a condition, include these items in the API call:</p>
<ol>
<li>Your REST API key... |
How to fix the invalid JSON in my case? <p>I have an invalid json stringify data came back from the postgres database.</p>
<p>It's a invalid string and the data is like</p>
<pre><code>{"{\"title\":\"john\"}","{\"tel\":\"12345\"}"}
</code></pre>
<p>In my code, I use the following to make it valid:</p>
<pre><code>var... | <p>You should fix the data that's saved inside the DB like suggested in the comments, the data is json-encoded multiple times.</p>
<p>If that's really not possible you can try to read it with something like this (untested):</p>
<pre><code>// First replace the first and last {} with []
var arrStr = '[' + json.substrin... |
Return HTTP status code dynamically as per the request using @ExceptionHandler <p>I want to return HTTPStatus code dynamically like 400, 400, 404 etc as per the response object r error.
Ive referred this question - <a href="http://stackoverflow.com/questions/20067057/programmatically-change-http-response-status-using-... | <p>You need to define different Exception handler for different Exception and then use <code>@ResponseStatus</code> as below: </p>
<pre><code>@ResponseStatus(HttpStatus.UNAUTHORIZED)
@ExceptionHandler({ UnAuthorizedException.class })
public @ResponseBody ExceptionResponse unAuthorizedRequestException(final Ex... |
how to focus google marker by marker title? <p>i want to focus on marker by giving title right now i am focusing by using lat and lng </p>
<pre><code>mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(26.89454, 75.82607), 15.0f));
</code></pre>
<p>So is there anyway i could focus on particular marker by ... | <p>You can store your markers in a <code>Map<String Marker></code> using the title as the key:</p>
<pre><code>private Map<String, Marker> markers = new HashMap<>();
</code></pre>
<p>When you add your markers to the map, you need to also add them to the hashmap:</p>
<pre><code>String markerTitle = "... |
Smarty check if URL contains some value <p>I use smarty and I want to check if my currenty URL contains some value.
Therefore I use the following code, but that does not work.</p>
<pre><code>{if $smarty.server.HTTP_REFERER|strstr:'domain=transfer&sld='}
</code></pre>
<p>The full URL;</p>
<pre><code>https://examp... | <p>Try <code>REQUEST_URI</code> instead of <code>HTTP_REFERER</code>.</p>
<p>This will do it.</p>
|
How to retrieve Material-UI <TableRow/>'s information based on selection on ReactJS? <p>I have a Material-UI's <code><Table/></code> (<a href="http://www.material-ui.com/#/components/table" rel="nofollow">http://www.material-ui.com/#/components/table</a>) with <code><TableRow/></code> with checkboxes set up... | <p>Look at this:
<a href="http://www.webpackbin.com/Ey6da192b" rel="nofollow">http://www.webpackbin.com/Ey6da192b</a></p>
<p>Selected rows are getting by key from array in a state.</p>
|
Simulation of timeseries in R <p>I need to make a simulation in R of the following function:</p>
<pre><code>y[t] = 4 + (9*x[t-1])*y[y-1]+r[t]
</code></pre>
<p>I also need to make a 3D plot. I'm new to R, and I therefore find it extremely difficult and hope that someone in here can help me.</p>
<p>This is what I've t... | <p>you have <code>y <- 4 + 9*x[t-1])*y[t-1]</code> its rise like geometric progression <code>10^t</code> ("<strong>9</strong>" coefficient) ...
The problem in "9" and "4" coefficients.
you would have "<strong>Inf</strong>" of "<strong>-Inf</strong>" most y. The rest 'y' would be huge... </p>
|
xcode swift how to debug why the app is crashing after closing <p>I just started coding with xcode and swift. I built a pretty simple app.
I run it in the simulator and is working fine. The problem occurs when I simulate the double tap home button and close the app. If I do this the app is not opening again so I have ... | <p>So, you mean you are seeing Xcode showing crash when you <strong>Terminate</strong> the app from <em>double tap -> slide and close app</em>.</p>
<p>This is the default behaviour of the Xcode. You are <em>closing/terminating</em> the app hence simulator connection with the Xcode is broken. If you single tap home but... |
Months represented in wrong order in SSRS Report <p>I'm running a SSRS report at present and one of the column headers is called [MonthName] - the report is currently producing the report with the months in alphabetical order so April, August, December etc</p>
<p>How I can get the report to be in order of January, Feb... | <p>Use this expression on the sorting property. I'm assuming that your data is in Full monthname.</p>
<pre><code>=SWITCH(Fields!MonthName.Value="January",1,
Fields!MonthName.Value="February",2,
Fields!MonthName.Value="March",3,
Fields!MonthName.Value="April",4,
Fields!MonthName.Value="May",5,
Fields!MonthName.Value="J... |
How to access git branch name from pipeline job? <p>I have a Jenkins Pipeline job which is configured to checkout a git repo and a specific local branch. </p>
<p><em>How can i get the name of the local branch in my Jenkinsfile?</em></p>
<p>I tried to load the git <a href="https://wiki.jenkins-ci.org/display/JENKINS/G... | <p>I'm now using the sh call to get the branch name. This requires at least version 2.4 of the Pipeline Nodes and Processes Plugin.</p>
<pre><code>def gitCommit = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim()
echo gitCommit
</code></pre>
|
Cache big PHP files in client browser - status '200 ok' instead of '304 not modified' - Apache <p>I modified the <code>.htaccess</code> at root like that:</p>
<pre><code>ExpiresActive On
ExpiresDefault "access plus 300 seconds"
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 ... | <p>Finally managed to cache this big html content
I used this : jonasjohn.de/snippets/php/caching.htm
(without using e-tag) and apcu php extension to store an application scoped variable. ( to check if katalog has been updated : I compare the app scoped varaible to a $_session variable , if they're the same I dont loa... |
Get leading alpha letters from string regex c# .net 4 <p>Get leading alpha letters from string</p>
<p>Given strings like "W6 8RF" or "WC2 5HS" how do you get the leading alphacharacters only</p>
<p>eG</p>
<pre><code>Input Wanted Result
"W6 8RF" "W"
"WC2 5HS" "WC"
</code></pre>
<p>My attempt </p>
<pre... | <p>Seems like you want to use <code>Regex.Match</code> rather than <code>Regex.Replace</code>, like so:</p>
<pre><code>string result = Regex.Match(postCode, @"^[A-Za-z]+").Value;
</code></pre>
<p>Otherwise, your regex is correct.</p>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.