title stringlengths 10 150 | body stringlengths 17 64.2k | label int64 0 3 |
|---|---|---|
Fix Resharper intellisense | <p>Does anyone know how to fix this, besides pressing esc then typing the variable name again?</p>
<p><img src="https://i.stack.imgur.com/buGX0.jpg" alt="enter image description here"></p>
<pre><code>JetBrains ReSharper 6.1 C# Edition
Build 6.1.37.86 on 2011-12-21T04:15:24
Plugins: none
Visual Studio 10.0.30319.1.
</... | 0 |
create hidden input with thymeleaf data | <p>So basically I have this table in my html page and its almost work as it should</p>
<pre><code><div th:each="good : ${goodList}">
<form action="#" th:action="@{/zamow}"
th:object="${enterGoodAction}" method="post">
<tr>
<input type="hidden" path="id" value="${good.id}"/> //this input
... | 0 |
How to run Selenium Java tests with TestNG programmatically? | <p>I am using Selenium RC with Java using TestNG as Test Framework. I'm using Eclipse as IDE. I want to invoke TestNG from my own program very easily. How can I do that?</p> | 0 |
How is geom_point removing rows containing missing values? | <p>I'm unsure why none of my data points show up on the map.</p>
<pre><code> Store_ID visits CRIND_CC ISCC EBITDAR top_bottom Latitude Longitude
(int) (int) (int) (int) (dbl) (chr) (fctr) (fctr)
1 92 348 14819 39013 76449.15 top 41.731373 -93.58184
2 2035 ... | 0 |
How to add a custom Ribbon tab using VBA? | <p>I am looking for a way to add a custom tab in the Excel ribbon which would carry a few buttons. I chanced on some resources addressing it via Google but all look dodgy and outrageously complicated. </p>
<p>What is a quick and simple way to do that ? I'd like the new tab to get loaded when my VBA gets loaded into Ex... | 0 |
Change desktop wallpaper using code in .NET | <p>How can I change the desktop wallpaper using C# Code?</p> | 0 |
How to find the length of unsigned char* in C | <p>I have a variable </p>
<pre><code>unsigned char* data = MyFunction();
</code></pre>
<p>how to find the length of data?</p> | 0 |
Why can't PHP have a constant object? | <p>I have a key-value database table, where I store some settings.</p>
<p>I would like to have these settings in a PHP constant object, since they shouldn't be editable.</p>
<p>In PHP7 we can now do this:</p>
<pre><code>define('MySettings', array(
'title' => 'My title'
// etc
));
// And call it with
echo... | 0 |
How to fix > No signature of method: build_dxc6m5s863o0nfrfjdg2bqjp.android() is applicable for argument types | <p>Problem: A problem occurred evaluating project ':app'.</p>
<blockquote>
<p>No signature of method: build_dxc6m5s863o0nfrfjdg2bqjp.android() is applicable for argument types: (build_dxc6m5s863o0nfrfjdg2bqjp$_run_closure1) values: [build_dxc6m5s863o0nfrfjdg2bqjp$_run_closure1@18112963]</p>
</blockquote>
<p>Gradle File... | 0 |
How to simulate mouse click using C++? | <p>I need to simulate a mouse click that clicks on application windows. I'm using Windows.</p>
<p>How can I send a left button mouse click to screen <code>x, y</code> coordinates where the window is located?</p> | 0 |
Embed a JavaFX application in a HTML webpage | <p>I'd like to embed one ore more JavaFX applications on a webpage. How do you do that?</p>
<p>There are several bits and pieces on the Oracle website, but there's no <strong>complete</strong> example.</p>
<p>There's the <a href="http://docs.oracle.com/javafx/2/deployment/deployment_toolkit.htm" rel="noreferrer">Depl... | 0 |
Exception in thread "main" java.util.MissingFormatArgumentException: Format specifier '10s' | <p>I'm no doubt missing something really obvious here but I can't figure it out. Any help would be appreciated. The mistake is coming from here:</p>
<pre><code>package B00166353_Grades;
public class Student{
String name,banner;
public Student(String name,String banner){
this.name=name;
this.b... | 0 |
HTML2PDF in PHP - convert utilities & scripts - examples & demos | <p>I have a quite complicated HTML/CSS layout which I would like to convert to PDF on my server. I already have tryed DOMPDF, unfortunately it did not convert the HTML with correct layout. I have considered HTMLDOC but I have heard that it ignores CSS to a large extent, so I suppose the layout would break apart with th... | 0 |
How can I load storyboard programmatically from class? | <p>My problem is that I was looking for way to use both <strong>storyboard</strong> and <strong>xib</strong>. But I can't find proper way to load and show storyboard programmatically. Project was started developing with xib, and now it's very hard to nest all xib files in storyboard. So I was looking a way to do it in ... | 0 |
How to prompt the user to enter a integer within a certain amount of numbers | <p>I was trying to figure out what statement to use to get the user to enter a number between 1 and 10. </p>
<p>here is what i have so far.</p>
<pre><code>int a;
printf("Enter a number between 1 and 10: \n);
scanf("%d", &a);
</code></pre> | 0 |
Renaming pandas data frame columns using a for loop | <p>I'm not sure if this is a dumb way to go about things, but I've got several data frames, all of which have identical columns. I need to rename the columns within each to reflect the names of each data frame (I'll be performing an outer merge of all of these afterwards). </p>
<p>Let's say the data frames are called ... | 0 |
Sending Commands through Telnet via Bash Script | <p>I am attempting to automate a telnet session in Debian, but I am having difficulty when it comes to sending commands.</p>
<p>By looking <a href="https://stackoverflow.com/questions/7013137/automating-telnet-session-using-bash-scripts">here</a>, I had a good understanding of what I needed to do.</p>
<pre><code>spaw... | 0 |
How to calculate the sentence similarity using word2vec model of gensim with python | <p>According to the <a href="http://radimrehurek.com/gensim/models/word2vec.html" rel="noreferrer">Gensim Word2Vec</a>, I can use the word2vec model in gensim package to calculate the similarity between 2 words.</p>
<p>e.g.</p>
<pre><code>trained_model.similarity('woman', 'man')
0.73723527
</code></pre>
<p>However,... | 0 |
How do i print out a number triangle in python? | <p>How do i print out a number triangle in python using a loop based program? It is not a homework assignment or anything its just an exercise from the book i have been trying to do but have not really come close. The triangle should print out looking like this: </p>
<pre><code>1
2 2
3 3 3
4 4 4 4
5 5 5 5 5
6 6 6... | 0 |
Create a variable in a Pandas dataframe based on information in the dataframe | <p>I have a dataframe organized in the following way</p>
<pre><code> var1 var2 var3 var4
0 A 23 B 7
1 B 13 C 4
2 C 12 A 11
3 A 5 C 15
</code></pre>
<p>I now want to create a new variable (column), var5, which takes the value of var2 if var1 == ... | 0 |
How do the different enum variants work in TypeScript? | <p>TypeScript has a bunch of different ways to define an enum:</p>
<pre><code>enum Alpha { X, Y, Z }
const enum Beta { X, Y, Z }
declare enum Gamma { X, Y, Z }
declare const enum Delta { X, Y, Z }
</code></pre>
<p>If I try to use a value from <code>Gamma</code> at runtime, I get an error because <code>Gamma</code> is... | 0 |
How to Learn Python on an Android Tablet | <p>My brother got excited about coding and would like to learn it. I recommended him Python as the first language. It will be ideal if he can experiment, make first programs on his andoid tablet.</p>
<p>Online solutions like <a href="http://www.pythonanywhere.com/" rel="nofollow">Pythonanywhere</a> are not usable in t... | 0 |
SQLite database in combination with fragments | <p>I'm changing my application from Activity's to Fragments, it's going great but I've one bug that won't let me open my database. Here's the error (from the logcat):</p>
<pre><code>05-17 15:28:38.704 13025-13025/com.MJV.werktijden E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException... | 0 |
PyTorch DataLoader - "IndexError: too many indices for tensor of dimension 0" | <p>I am trying to implement a CNN to identify digits in the MNIST dataset and my code comes up with the error during the data loading process. I don't understand why this is happening.</p>
<pre class="lang-py prettyprint-override"><code>import torch
import torchvision
import torchvision.transforms as transforms
trans... | 0 |
Mocking Joda DateTime method using Mockito | <p>I want <code>millis</code> to return specified value.</p>
<pre><code>public long myMethod(){
DateTime nowDateTime = new DateTime(DateTimeZone.UTC);
long millis = nowDateTime.getMillis();
System.out.println(millis);
}
</code></pre>
<p>I tried this with no luck.</p>
<pre><code>@RunWith(PowerMockRunner.c... | 0 |
What's a Chocolatey "Install" package? | <p>On reviewing the <a href="https://chocolatey.org/packages">chocolatey packages</a> available, I came across a few that have two (or sometimes more) packages apparently for the same product. At first glance is not possible to tell the difference.</p>
<p>For example, there is the <em>AutohotKey</em> package, and then... | 0 |
Unity UI RectTransform position does not make sense to me | <p>So, I'm using C# in unity to place some objects using Unity UI, and I have an object whose position in script is not the same as its position in the scene. I have the following code in a function:</p>
<pre><code>using UnityEngine;
using System.Collections;
public class SeedChecker : MonoBehaviour {
Vector3 lo... | 0 |
GridView elements changes their place dynamically when scroll screen | <p><strong>i have a gridview layout, and all items are insert very fine,</strong></p>
<p>now if I check on big screen then all work done is fine, because no scrolling is required</p>
<p>but if I check on small screen then items are changed their position dynamically,</p>
<p>bereif example is given below:-</p>
<p><s... | 0 |
ASP.NET CLR Not Enabled | <p>I am getting the following error on my new installation of ASP.Net and SQL Server when I run my app:</p>
<pre><code> Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option
</code></pre>
<p>I have tried to fix it by running this:</p>
<pre><code> use dasolPSDev;
sp_con... | 0 |
Feature/Variable importance after a PCA analysis | <p>I have performed a PCA analysis over my original dataset and from the compressed dataset transformed by the PCA I have also selected the number of PC I want to keep (they explain almost the 94% of the variance). Now I am struggling with the identification of the original features that are important in the reduced da... | 0 |
Select onchange reload the page and keep the selected option | <p>I have this <a href="https://jsfiddle.net/1zqgeq79/2/" rel="nofollow noreferrer">https://jsfiddle.net/1zqgeq79/2/</a></p>
<p>This is the jquery I'm using to make the page refresh when a select has been changed and now I just need it to keep that selected option after the page loads.</p>
<pre><code> $('.Produ... | 0 |
Can't change font in Atom | <p>I've tried setting various fonts in Atom (Fedora 21, Atom 0.187) but none seem to work.
I've tried setting Font Family to DejaVuSansMono and DroidSansMono but nothing changes (And yes they are installed)</p> | 0 |
Redirect to a subfolder in Apache virtual host file | <p>I have Joomla installed on a webserver running Ubuntu Server 12.04. The Joomla folder is located at /var/www/cms/. </p>
<p>My vhost file at /etc/apache2/sites-enabled/default has the following content:</p>
<pre><code><VirtualHost *:80>
ServerName domain.com/
Redirect permanent / https://domain.com/
&... | 0 |
InternalsVisibleTo does not work | <p>I insert the line:</p>
<p><code>[assembly: InternalsVisibleTo("MyTests")]</code> </p>
<p>inside my project under test( <code>Properties/AssemblyInfo.cs</code>) where <code>MyTests</code> is the name of the Unit Test project. But for some reason I still cannot access the internal methods from the unit test project.... | 0 |
How to resolve errors CS1003: Syntax error, '(' expected, and error CS1031: Type expected? | <p>I am creating a 2d platform game in the Unity Engine Version Num - 2018.4.9f1 with c# compiled with Visual Studio Version Num - 1.38.1.</p>
<p>The console in Unity Engine is showing two errors listed below with the code I have in the Visual Studio.</p>
<blockquote>
<p>error CS1003: Syntax error, '(' expected</p>... | 0 |
milliseconds to days | <p>i did some research, but still can't find how to get the days... Here is what I got:</p>
<pre><code>int seconds = (int) (milliseconds / 1000) % 60 ;
int minutes = (int) ((milliseconds / (1000*60)) % 60);
int hours = (int) ((milliseconds / (1000*60*60)) % 24);
int days = ????? ;
</code></pre>
<p>Please help, I su... | 0 |
How can I bulk rename files in PowerShell? | <p>I'm trying to do the following:</p>
<pre><code>Rename-Item c:\misc\*.xml *.tmp
</code></pre>
<p>I basically want to change the extension on every files within a directory to <code>.tmp</code> instead of <code>.xml</code>. I can't seem to find a straight forward way to do this in PowerShell.</p> | 0 |
Read Contents of txt file and display in Tkinter GUI Python | <p>Hey I have successfully created a <code>tkinter</code> GUI in python which saves the entered values in a text file. Here is the code:</p>
<pre><code>from Tkinter import *
root = Tk()
def save():
open("text.txt","w").close()
text = e.get() + "\n" + e1.get() + "\n" + e2.get() + "\n"
with open("text.txt",... | 0 |
WebSockets on iOS | <p>I've read that WebSockets work on iOS 4.2 and above. And I can verify that there is indeed a WebSocket object. But I can't find a single working WebSocket example that works on the phone. </p>
<p>For example <a href="http://yaws.hyber.org/websockets_example.yaws" rel="noreferrer">http://yaws.hyber.org/websockets_ex... | 0 |
How do I provide success messages asp.net mvc? | <p>How do I provide success messages in asp.net mvc?</p> | 0 |
Show Dialog from ViewModel in Android MVVM Architecture | <p>About MVVM with new architecture components, I've a question, how should I implement if my app needs to display for example a Dialog with 3 options from some action that happened in my VM? Who is responsible for sending to Activity/Fragment the command to show dialog?</p> | 0 |
Memory Efficient L2 norm using Python broadcasting | <p>I am trying to implement a way to cluster points in a test dataset based on their similarity to a sample dataset, using Euclidean distance. The test dataset has 500 points, each point is a N dimensional vector (N=1024). The training dataset has around 10000 points and each point is also a 1024- dim vector. The goa... | 0 |
Convert ES6 JavaScript to ES5 without transpiler | <p>I am not familiar with new JavaScript ES6 coding conventions and have been given some code where I need it to be plain old JavaScript ES5.</p>
<p>I need to convert this JS code without the use of Babel or any other transpiler. I cannot use Babel as I am not allowed to use it at work. </p>
<p>I realise that all the... | 0 |
Configure Puppeteer executablePath chrome in your local Windows | <ul>
<li>Puppeteer version : 1.11.0</li>
<li>Platform / OS version: Windows 10 pro</li>
<li>Node.js version: 12.6.6</li>
</ul>
<p>When I did a local development test in windows, happen was problem in executablePath. </p>
<p>"Failed to launch chrome! spawn /usr/bin/chromium-browser ENOENT"</p>
<p>I saw for windows n... | 0 |
Where can I get the 10.6 SDK for XCode | <p>Where can I get the 10.6 SDK for XCode? I have the beta of Snow Leopard, and I installed XCode off of the DVD, but it only installed the 10.5 and 10.4 SDKs. I need to build against 10.6 to verify a bug for Apple.</p> | 0 |
Converting a list of tuples into a dict | <p>I have a list of tuples like this:</p>
<pre><code>[
('a', 1),
('a', 2),
('a', 3),
('b', 1),
('b', 2),
('c', 1),
]
</code></pre>
<p>I want to iterate through this keying by the first item, so, for example, I could print something like this:</p>
<pre><code>a 1 2 3
b 1 2
c 1
</code></pre>
<p>How would I go about do... | 0 |
Fastest way to move files on a Windows System | <p>I want to <strong>move about 800gb of data from an NTFS storage device to a FAT32 device</strong> (both are external hard drives), on a Windows System.</p>
<p>What is the best way to achieve this?</p>
<ol>
<li>Simply using cut-paste?</li>
<li>Using the command prompt ? (<code>move</code>)</li>
<li>Writing a batch ... | 0 |
How do I find out if the GPS of an Android device is enabled | <p>On an Android Cupcake (1.5) enabled device, how do I check and activate the GPS?</p> | 0 |
Calculating which tiles are lit in a tile-based game ("raytracing") | <p>I'm writing a little tile-based game, for which I'd like to support light sources. But my algorithm-fu is too weak, hence I come to you for help.</p>
<p>The situation is like this: There is a tile-based map (held as a 2D array), containing a single light source and several items standing around. I want to calculate... | 0 |
Creating a byte array from a stream | <p>What is the prefered method for creating a byte array from an input stream? </p>
<p>Here is my current solution with .NET 3.5. </p>
<pre><code>Stream s;
byte[] b;
using (BinaryReader br = new BinaryReader(s))
{
b = br.ReadBytes((int)s.Length);
}
</code></pre>
<p>Is it still a better idea to read and write ch... | 0 |
Accessing the index in 'for' loops | <p>How do I access the index while iterating over a sequence with a <code>for</code> loop?</p>
<pre><code>xs = [8, 23, 45]
for x in xs:
print("item #{} = {}".format(index, x))
</code></pre>
<p>Desired output:</p>
<pre class="lang-none prettyprint-override"><code>item #1 = 8
item #2 = 23
item #3 = 45
</co... | 0 |
How to run tests in a playlist file from mstest command line | <p>Is there a way I can use the playlist file to run tests from commandline using MSTest.exe? I tried using following command line but it fails with and error -</p>
<blockquote>
<pre><code>mstest.exe /testmetadata:test.playlist
</code></pre>
</blockquote>
<pre><code>The file 'test.playlist' has unknown format and can... | 0 |
Convert UPPERCASE string to sentence case in Python | <p>How does one convert an uppercase string to proper sentence-case? Example string:</p>
<pre><code>"OPERATOR FAIL TO PROPERLY REMOVE SOLID WASTE"
</code></pre>
<p>Using <code>titlecase(str)</code> gives me:</p>
<pre><code>"Operator Fail to Properly Remove Solid Waste"
</code></pre>
<p>What I need is:</p>
<pre><co... | 0 |
Segmentation fault in libcurl, multithreaded | <p>So I've got a bunch of worker threads doing simple curl class, each worker thread has his own curl easy handle. They are doing only HEAD lookups on random web sites. Also locking functions are present to enable multi threaded SSL as documented <a href="http://www.openssl.org/docs/crypto/threads.html" rel="noreferrer... | 0 |
What are Google Test, Death Tests | <p>I saw the documentation of that feature is seem pretty major since it's in Google Test overview features and detailed in:<br />
<a href="https://github.com/google/googletest/blob/master/docs/advanced.md#death-tests" rel="nofollow noreferrer">https://github.com/google/googletest/blob/master/docs/advanced.md#death-tes... | 0 |
Getting an Image object from a byte array | <p>I've got a byte array for an image (stored in the database). I want to create an Image object, create several Images of different sizes and store them back in the database (save it back to a byte array).</p>
<p>I'm not worried about the database part, or the resizing. But is there an easy way to load an Image obj... | 0 |
checked and unchecked exception in .NET | <p>a strange idea comes to me when I'm reading APUE(Advanced Programming in UNIX Environment).</p>
<p>It seems that in UNIX's error handling, there are two types of errors (FATAL & INFATAL). I feel like it's something related to checked and unchecked Exceptions in JAVA.</p>
<p>So, to sum up, in a program, you hav... | 0 |
Rails assign session variable | <p>Hi I'm hacking around Rails the last 8 months so don't truly understand a number of things. I've seen and used helper methods that set the current_user etc. and am now trying to replicate something similar. </p>
<p>I'm trying to set a global value in the application controller for the current company the user is in... | 0 |
R: find the number of common elements of two lists | <p>Let's say I have these two lists, and I want to figure out the number of column elements among these two lists:</p>
<pre><code>> xl
[[1]]
[1] 1 2 3 4 5
> yl
[[1]]
[1] 4 3 5 6 7
</code></pre>
<p>So, in this example, the answer would be 3. Any suggestions?</p> | 0 |
eclipse android emulator not starting | <p>I have some problems with my emulator in eclipse. When I create an AVD and start it, the emulator is running and showing the "Android" logo/text, but never moves on from there.</p>
<p>Should I set some specific settings when I create a new AVD to make it run faster?
Any suggestions will be greatly appreciated</p> | 0 |
Check whether an array exists in an array of arrays? | <p>I'm using JavaScript, and would like to check whether an array exists in an array of arrays. </p>
<p>Here is my code, along with the return values: </p>
<pre><code>var myArr = [1,3];
var prizes = [[1,3],[1,4]];
prizes.indexOf(myArr);
-1
</code></pre>
<p>Why? </p>
<p>It's the same in jQuery: </p>
<pre><code>$.in... | 0 |
How to detect when UINavigationController animation has finished? | <p>I hope this is a simple question. If I have a UINavigationController and I push a new view controller onto the stack with an animated transition, how can I detect when the animation has finished and the new view controller is on screen? </p>
<p>I have a few scenarios where I need to push a new controller that then ... | 0 |
<--- and <-> in pseudocode | <p>I am not from cs background and I am trying to make sense of what is used for what. In pseudocode I see a lot of this:</p>
<pre><code>for i <--- 1 to n-1 do
j <--- find-Min(A,i,n)
A[j] <-> A[i]
end for
</code></pre>
<p>What are <code><---</code> and <code><-></code> used to refer to?</p> | 0 |
HTTP HEAD request with HttpClient in .NET 4.5 and C# | <p>Is it possible to create a HTTP HEAD request with the new <code>HttpClient</code> in .NET 4.5? The only methods I can find are <code>GetAsync</code>, <code>DeleteAsync</code>, <code>PutAsync</code> and <code>PostAsync</code>. I know that the <code>HttpWebRequest</code>-class is able to do that, but I want to use the... | 0 |
Cleanest way to convert a `Double` or `Single` to `Integer`, without rounding | <p>Converting a floating-point number to an integer using either <a href="https://msdn.microsoft.com/en-us/library/s2dy91zy.aspx" rel="nofollow noreferrer">CInt</a> or <code>CType</code> will cause the value of that number to be rounded. The <code>Int</code> function and <code>Math.Floor</code> may be used to convert a... | 0 |
How to extract phrases from corpus using gensim | <p>For preprocessing the corpus I was planing to extarct common phrases from the corpus, for this I tried using <strong>Phrases</strong> model in gensim, I tried below code but it's not giving me desired output.</p>
<p><strong>My code</strong></p>
<pre><code>from gensim.models import Phrases
documents = ["the mayor o... | 0 |
Vue.js: Calling function on change | <p>I'm building a component in Vue.js. I have an input on the page where the user can request a certain credit amount. Currently, I'm trying to make a function that will log the input amount to the console, as I type it in. (Eventually, I'm going to show/hide the requested documents based on the user input. I don't wan... | 0 |
Apple Mach-O-Linker Error CocoaPods | <p>I've been trying to get my app up and running. From what I could tell the app was missing Cocoapods as a dependency. So. I installed and added Cocoapods. But I'm still getting the same error for whatever reason. I'm an inexperienced developer trying to teach himself I must add. </p>
<blockquote>
<p>Ld
/Users/bf... | 0 |
How to delay KeyPress function when user is typing, so it doesn't fire a request for each keystroke? | <p><strong>background</strong></p>
<p>I have a number of dropdowns on a page. If you change the first one, the rest of the dropdowns are updated according to what you've selected.</p>
<p>In our case, we deal with fund data. So the first dropdown is "All Fund Types". You select "Hedge Funds", and the next dropdown is ... | 0 |
Why eslint consider JSX or some react @types undefined, since upgrade typescript-eslint/parser to version 4.0.0 | <p>The context is pretty big project built with ReactJs, based on eslint rules, with this eslint configuration</p>
<pre><code>const DONT_WARN_CI = process.env.NODE_ENV === 'production' ? 0 : 1
module.exports = {
extends: [
'eslint:recommended',
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
... | 0 |
How to center a width unknown button in a bootstrap's span? | <p>I have a button generated by backbone.js and jQuery.tmpl() and width of the button is variant. I want to put it in a span6 div. Code is shown below:</p>
<pre><code><div class="row">
<div class="span6">
<button class="btn primary large">
BLABLABLA
</button>
</div>
&l... | 0 |
Calculate the difference between two dates in React Native | <p>I need to calculate the difference between two dates in days </p>
<p>i bring today date: new Date().toJSON().slice(0, 10) = 2019-04-17
and the other date in the same form </p> | 0 |
Angular2 - Parse JSON into an Object | <p>Example: I have a Entity-Class named "Person"</p>
<pre><code>constructor(name:string,surname:string,birthdate:string) {
this.name = name;
this.surname = surname;
this.birthdate = birthdate;
}
</code></pre>
<p>And in a "Manager"-Class I get a string that looks like a JSON:</p>
<pre><code>{
"name" :... | 0 |
View a file's history in Magit? | <p><a href="https://stackoverflow.com/questions/278192/view-the-change-history-of-a-file-using-git-versioning">View the change history of a file using Git versioning</a> talks about other ways of viewing history of a file in Git.</p>
<p>Can it be done in Emacs Magit? </p> | 0 |
C++ Inner class not able to access Outer class's members | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/486099/can-inner-classes-access-private-variables">Can inner classes access private variables?</a><br>
<a href="https://stackoverflow.com/questions/11405069/inner-class-accessing-outer-class">Inner class accessin... | 0 |
PHP email encryption | <p>I have a website with an SSL.</p>
<p>I would like to encrypt outgoing emails from my server. I've been digging around at this and I really don't know where to begin.</p>
<p>Here is my PHP email script so you have an idea of what I'm using:</p>
<pre><code>public function email($to, $title, $message){
$from = "... | 0 |
How do you get errors in the ModelState, for a particular property? | <p>I'm encountering the following issue: <a href="https://github.com/aspnet/Mvc/issues/4989" rel="noreferrer">https://github.com/aspnet/Mvc/issues/4989</a>, and based on 'rsheptolut' comment on Sep 12, 2016, he found this workaround (pasted for convenience):</p>
<pre><code><form class="form-horizontal" asp-antiforg... | 0 |
How to propagate errors through catchError() properly? | <p>I wrote a function that is <code>pipe</code>-able:</p>
<pre class="lang-ts prettyprint-override"><code>HandleHttpBasicError<T>()
{
return ((source:Observable<T>) => {
return source.pipe(
catchError((err:any) => {
let msg = '';
if(err &&am... | 0 |
Debugging python in Atom? | <p>Any package or IDE for Atom that will allow me to watch variables when debugging?</p>
<p>I tried <a href="https://github.com/webBoxio/atom-hashrocket" rel="noreferrer">https://github.com/webBoxio/atom-hashrocket</a>
but this does not let me go step by step</p>
<p>I tried <a href="https://atom.io/packages/python-de... | 0 |
How can I make CalendarExtender StartDate attribute take the current date? | <p>I thought something like this </p>
<pre><code><ajaxToolkit:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
TargetControlID="txtDatumPoaganje" Format="MM/dd/yyyy" StartDate=<%=DateTime.Now%>>
</code></pre>
<p>But it doesnt work. I can make something similar with JavaScript a... | 0 |
How to set XAML Width in percentage? | <p>I am trying to create a button in XAML with a 80% width, but I can't seem to figure out how. It's apparently not as easy as using Width="80%". I have been thinking this can be done by detecting the screen width somehow and multiply that by 0.8 and use that as the width, but I am not sure how I can do this in XAML. P... | 0 |
SQL Dynamic DatePart when using DateDiff | <p>Is there a way to pass the DatePart parameter of DateDiff as a variable?
So that I can write code that is similar to this?</p>
<pre><code>DECLARE @datePart VARCHAR(2)
DECLARE @dateParameter INT
SELECT @datePart = 'dd'
SELECT @dateParameter = 28
SELECT
*
FROM
MyTable
WHERE
DATEDIFF(@datePart, MyTable.M... | 0 |
Get the real width and height of an image with JavaScript? (in Safari/Chrome) | <p>I am creating a jQuery plugin.</p>
<p>How do I get the real image width and height with Javascript in Safari?</p>
<p>The following works with Firefox 3, IE7 and Opera 9:</p>
<pre><code>var pic = $("img")
// need to remove these in of case img-element has set width and height
pic.removeAttr("width");
pic.removeA... | 0 |
How can I calculate a CRC32 as a signed integer in C#? | <p>I'm a PHP developer and a little out of my element in C#. In PHP, there's a <a href="http://www.php.net/manual/en/function.crc32.php" rel="noreferrer">crc32() function</a> which returns a signed integer for any string that you pass in.</p>
<p>So this is what I'm used to:</p>
<pre><code><?php
echo crc32("test");... | 0 |
How to get the java.security.PrivateKey object from RSA Privatekey.pem file? | <p>I have a RSA private key file (OCkey.pem). Using java i have to get the private key from this file. this key is generated using the below openssl command.
Note : I can't change anything on this openssl command below.</p>
<pre><code>openssl> req -newkey rsa:1024 -sha1 -keyout OCkey.pem -out OCreq.pem -subj "/C=c... | 0 |
No service for type 'Microsoft.AspNetCore.Mvc.Localization.IHtmlLocalizer' has been registered | <p>I try with ASP.Core to have a multilanguages website. So, I have in my StartUp.cs:</p>
<pre><code>public void ConfigureServices(IServiceCollection services)
{
services.AddLocalization();
services.Configure<RequestLocalizationOptions>(
opts =>
{
var supportedCultures = new[]
... | 0 |
how to make the text size of the x and y axis labels and the title on matplotlib and prettyplotlib graphs bigger | <p>I set the figure size of a matplotlib or prettyplotlib graph to be large.
As an example lets say the size is 80 height by 80 width. </p>
<p>The text size for the plot title, x and y axis labels (i.e. point label 2014-12-03 and axis label [month of year] become very small to the point they are unreadable.</p>
<p>Ho... | 0 |
Speed up VIM cursor moving through j/k | <p>On my friend new Mac, he scrolls from line #1 to line #100 using <code>k</code> in around 4 seconds.
On my Mac, it takes 10 seconds. Neither of us know what causes his MacVim scrolls that fast.</p>
<p>Any way that I can improve the speed of scrolling on my MacVim? I already enabled <code>ttyfast</code> and <code>la... | 0 |
Difference between <?php and <? | <p>I am new to php and would like to know if there are any differences between these server tags :</p>
<pre><code><?php
?>
</code></pre>
<p>and </p>
<pre><code><?
?>
</code></pre> | 0 |
How can I find the current Windows language from cmd? | <p>I would like to run a script for each language.
I need a way to find which os language is being used, using batch files.
Both on windows XP, and on Windows 7.</p> | 0 |
SAPUI5 - complex model binding | <p>I have this json model:</p>
<p><strong>model/data.json</strong></p>
<pre><code>{
"orders" : [
{
"header" : { "id" : "00001", "description" : "This is the first order" },
"items" : [
{ "name" : "Red Book","id" : "XXYYZZ" },
{ "name" : "Yellow Book"... | 0 |
Partial results using speech recognition | <p>I created a simple application inspired by <a href="http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/VoiceRecognition.html" rel="nofollow">this example</a> in order to test all the available options (ie extra). I read about the <a href="http://developer.android.com/reference/a... | 0 |
Column has a data type that cannot participate in a columnstore index | <p>I want to create a clustered columnstore index in a table using the following query:</p>
<pre><code>CREATE CLUSTERED COLUMNSTORE INDEX cci
ON agl_20180319_bck
</code></pre>
<p>And I am getting this error:</p>
<blockquote>
<p>Msg 35343, Level 16, State 1, Line 6<br />
The statement failed. Column 'memberOf' has a dat... | 0 |
Using Google Analytics without Javascript? | <p>Is it possible to use the Google Analytics code on a website which does not support javascript or any server side scripting? (<em>For example a profile page on a website which allows to use only HTML</em>).</p>
<p>I have found out that analytics code can be used without using the javascript by calling the tracking ... | 0 |
Javascript Absolute Positioning | <p>I am trying to create a new div layer using JavaScript that can be absolutely positioned on the page after page load.</p>
<p>My code is as follows:</p>
<pre><code><html><head>
<script type="text/javascript">
function showLayer() {
var myLayer = document.createElement('div');
myLayer.id = 'bookin... | 0 |
how to bring live magento site to localhost without effecting live site | <p>i want a live site to be on local host and without effecting any functionality of live magento site. i have tried many way of doing that but have not get any result from it.</p>
<p>steps i tried are :
1. taken database from magento live site by entering into cpanel(by ftp access) > phpmyadmin > exported all the fil... | 0 |
pymongo - "dnspython" module must be installed to use mongodb+srv:// URIs | <p>I am trying to connect MongoDB from Atlas.</p>
<p>My <strong>mongo uri</strong> is: <code>mongodb+srv://abc:123@something.something.com/admin?retryWrites=True</code></p>
<p>My <strong>pymongo version</strong> is <code>3.6.1</code></p>
<p>I have installed <code>dnspython</code> and done <code>import dns</code></p>
<p... | 0 |
Android support Toolbar + ActionBarDrawerToggle not changing to arrow | <p>I'm struggling with the toolbar and drawer. I'm trying to make the burger switch to arrow when I'm adding a new fragment to the backstack but there is no way to do it.</p>
<p>Maybe I'm missing something but I could not find a way. Anyone had the same problem?</p>
<p>This is the declaration:</p>
<pre><code>mDrawer... | 0 |
What do I need for development for an ARM processor? | <p>I'm familiar with X86[-64] architecture & assembly. I want to start develop for an ARM processor. But unlike desktop processors, I don't have an actual ARM processor. I think I need an ARM simulator.</p>
<p><a href="http://www.armtutorial.com/" rel="nofollow noreferrer">http://www.armtutorial.com/</a> say</p>
... | 0 |
How to determine the end of an integer array when manipulating with integer pointer? | <p>Here is the code:</p>
<pre><code>int myInt[] ={ 1, 2, 3, 4, 5 };
int *myIntPtr = &myInt[0];
while( *myIntPtr != NULL )
{
cout<<*myIntPtr<<endl;
myIntPtr++;
}
Output: 12345....<junks>..........
</code></pre>
<p>For Character array: (Since we have a NULL character at the end, no proble... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.