title
stringlengths
10
150
body
stringlengths
17
64.2k
label
int64
0
3
100% height div between header and footer
<p>I am trying to create a webpage layout with a header/footer (100% width, 145px height), a 'main area' between the header/footer (100% width, dynamic height), and a container around the content that is a unique background color (860px width, dynamic height but is always 'flush' against the footer). </p> <p><strong>(...
0
javax.net.ssl.SSLHandshakeException:No appropriate protocol. How to force Java to use TLSv1.2 for sending mail?
<p>I am trying to use JavaMailSender to send mails in spring boot, but I am getting this error:</p> <pre><code>javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate). Failed messages: javax.mail.MessagingException: Could not convert socket to TLS; nested...
0
AngularJS: Scroll to end of element after applying DOM changes
<p>I have a simple list of items. I want to be able to scroll to the bottom of the element displaying the items whenever I add more items. I understood there is no way of hooking to the end of the <code>$apply()</code> function, so what might be my solution?</p> <p>Here is a <a href="http://jsfiddle.net/gNBnq/2/" rel=...
0
COBOL Program to read a flat file sequentially and write it to an output file, not able to read at all loop is going infinite
<p>I'm trying to write COBOL Program to read a flat file sequentially and write it to an output file, I'm able to read only one record at a time, not able to read next record what should I do?</p> <p>Here is my code:</p> <pre><code>PROCEDURE DIVISION. OPEN INPUT FILEX. ...
0
Getting "illegal access to loading collection" error
<p>When I execute my program without implementing <code>hashcode()</code> and <code>toString()</code> then it works fine. But as soon as I include <code>hashcode()</code> and <code>toString()</code> then I get this "illegal access to loading collection" error.</p> <p>My hbm files are </p> <p><strong>1) booking.hbm.xm...
0
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
<p>When I upgrade flutter, I came across with below error message.</p> <blockquote> <p>curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54</p> </blockquote> <pre><code>Failed to retrieve the Dart SDK from: https://storage.googleapis.com/flutter_infra/flutter/4737fc5cd89b8f0136e927b00f2e159444b95a73/dart-sdk-d...
0
Upgrade .Net Framework 2.0 To 4.5
<p>I have upgraded my asp.net 2.0 project to 4.5 by using Visual Studio 2012. It is building fine, but will I have to test each webform in the browser or will it be converted 100% automatically? Without the .Net Framework 2.0, will the converted project work fine?</p>
0
How to provide a password for PostgreSQL's createdb non-interactively?
<p>I have a task in phing where before tests I drop the database if exists and create it. This is run on Jenkins. I want to do it with createdb like this:</p> <pre><code>&lt;exec command="createdb my_database" /&gt; </code></pre> <p>The thing is that the createdb is asking me to authenticate and adding -Umy_user par...
0
How to run Git server on Windows?
<p>How can I share a Git repo on Windows? The "correct" ways appear to be to run "git-daemon" (unix specific) or run ssh (unix specific) or run an http front end for Git. If I just have two Windows boxes and don't feel like installing Unix just to run Git, what is the optimal way to share the repos between the two b...
0
Is there a way to create transparent windows with Tkinter?
<p>I'm trying, ultimately, to create "oddly-shaped windows" with Python using the Tkinter module. But for now I will settle for being able to make the background transparent while keeping child widgets fully-visible.</p> <p>I'm aware this is done with wxPython and some other modules, but I'm inquiring as to the limits...
0
How to truncate date in PostgreSQL?
<p>I'm trying to select all transactions in PostgreSQL 9 that happened earlier than the end of the last week. Which date function I should use to build such an interval?</p>
0
How to get the error string in openssl?
<p>I am using openssl to establish the TLS connection with the remote server.</p> <p>Here are the code snippets:</p> <pre class="lang-c prettyprint-override"><code>if ((ret = SSL_connect(c-&gt;ssl)) &lt;= 0) { ret = SSL_get_error(c-&gt;ssl, ret); if((err = ERR_get_error())) { SSL_load_error_strings();...
0
ExecuteReader returns no results, when inspected query does
<p>Consider the following code:</p> <pre><code> StringBuilder textResults = new StringBuilder(); using(SqlConnection connection = new SqlConnection(GetEntityConnectionString())) { connection.Open(); m.Connection = connection; SqlDataReader results = m.ExecuteR...
0
Redraw/Resize highcharts when printing website
<p>When I'm printing the bottom right frame the text <code>some text</code> is partly covered by the highcharts because they don't resize before printing. Is there a solution to configure a printing layout with <code>@media print</code> for the website and force highcharts to redraw/resize to container size when websit...
0
SQL Server: Error converting data type varchar to float
<p>I have the following <code>SELECT</code> statement to calculate <code>RADIANS</code> and <code>COS</code>. </p> <pre><code>SELECT COS(RADIANS(latitude)) as Lat FROM tbl_geometry; </code></pre> <p>But I'm getting an error:</p> <blockquote> <p>Error converting data type varchar to float.</p> </blockquote> <p>My...
0
PHP - Get key name of array value
<p>I have an array as the following:</p> <pre><code>function example() { /* some stuff here that pushes items with dynamically created key strings into an array */ return array( // now lets pretend it returns the created array 'firstStringName' =&gt; $whatEver, 'secondStringName' =&gt;...
0
pandas drops index index on merge in Python?
<p>I am merging two dataframes using <code>merge(..., how='left')</code> since I want to retain only entries that match up with the "left" dataframe. The problem is that the merge operation seems to drop the index of my leftmost dataframe, shown here:</p> <pre><code>import pandas df1 = pandas.DataFrame([{"id": 1, ...
0
Mongoose: Cast to ObjectId failed for value
<p>I'm trying to specify the schema of my db in mongoose. At the moment I do this:</p> <pre><code>var Schema = mongoose.Schema; var today = new Date(2011, 11, 12, 0, 0, 0, 0); var personSchema = new Schema({ _id : Number, name: { type: String, required: true }, tel: { type: String, required: true }, ...
0
Right way to format date with strings like today, yesterday, tomorrow etc
<p>I have a date textview. And my textview holds a date string like 2011.09.17. Well I still do want to have that but I also want to add some more user friendly info for some specific dates like today or yesterday. For example if today is 2011.09.17 I want my textview to have value of yesterday instead 2011.09.16 and t...
0
Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly
<p>I have a problem to generate the locales on the serveur herbert and homer . I run mongo I get the warning </p> <pre><code>Failed global initialization: BadValue Invalid or no user locale set. Please ensure LANG and/or LC_* environment variables are set correctly. </code></pre> <p>When I run </p> <p><code>dpkg-rec...
0
Qt: How to resize a window to its new content
<p>I have a window containing a <code>QScrollArea</code> with a couple widgets in it.</p> <p>Until now, I was creating the <code>QScrollArea</code> and its child widgets in the constructor of my window, and then I was resizing the window vertically to fit its content using <code>resize(400, sizeHint().height())</code>...
0
Setting near plane in OpenGL
<p>i have implemented first person camera in OpenGL, but when i get closer to an object it starts to disappear, so i want to set near plane close to zero so i could get closer to the objects. So if anybody can tell me what is the best way to do that. Thank you. </p>
0
Connecting to telnet server and send/recieve data
<p>So I am trying to connect to my telnet server, which works. It recives the first lot of data from the server which is us being asked to enter password to connect. But when I type in the password it does nothing and nothing that is recieved is printed to my console.</p> <p>An example of the output is as follows:</p>...
0
Using std::ostream as argument to a print function
<p>I have always used <code>cout</code> to print the statement but now I want learn printing by <code>passing the stream</code>, something like <code>void print(std::ostream&amp;) const;</code> my current print function looks like</p> <pre><code>template &lt;class T&gt; void Mystack&lt;T&gt;::print() { for (int ...
0
How to read from a text file compressed with 7z?
<p>I would like to read (in Python 2.7), line by line, from a csv (text) file, which is 7z compressed. I don't want to decompress the entire (large) file, but to stream the lines.</p> <p>I tried <code>pylzma.decompressobj()</code> unsuccessfully. I get a data error. Note that this code doesn't yet read line by line:</...
0
Codeigniter Pagination From Database limit, offset
<p>I started a web application in CI 3.0, everything working smooth, I got my pagination working, but there is a problem wich I cannot figure out...</p> <p>For example, I have the following URL: <strong>localhost/statistics/api_based</strong> When navigate, $query results are displayed, links are generated, OK. But, w...
0
Reaver hanged up on waiting for beacon
<p>These are the commands I put into the terminal on my laptop.</p> <p><code> root@ubuntu:~# reaver -i mon0 -b F8:7B:7A:69:9F</code></p> <pre><code>Reaver v1.4 WiFi Protected Setup Attack Tool </code></pre> <p><code>Copyright (c) 2011, Tactical Network Solutions, Craig Heffner &lt;cheffner@tacnetsol.com&gt; </code></...
0
Using .tupled method when companion object is in class
<p>I am in the process of migrating from Slick to Slick 2, and in Slick 2 you are meant to use the <code>tupled</code> method when projecting onto a case class (as shown here <a href="http://slick.typesafe.com/doc/2.0.0-RC1/migration.html" rel="nofollow noreferrer">http://slick.typesafe.com/doc/2.0.0-RC1/migration.html...
0
JQuery DatePicker: How to add a custom class
<p>I need to apply a custom style to my datepicker but can't work out how to add a custom class to the datepicker. I am defining my date picker as follows:</p> <pre><code> $("#From").datepicker({ showOn: 'button', buttonImage: '/Content/images/icon-calendar.gif', ...
0
U2U Caml Query Builder no longer available?
<p>I'm trying to download the fantastic U2U Caml Query Builder but all the links I'm finding are dead and I can't find any references to it on the u2u site. Has it been end-of-lifed? Does anyone know of a location where it is still available from?</p> <p>Dead link - <a href="http://www.u2u.be/res/tools/camlquerybuilde...
0
Google Chart arrayToDataTable formatted value not working
<p>I am followinf the google Chart documentation for <a href="https://google-developers.appspot.com/chart/interactive/docs/datatables_dataviews?hl=en#arraytodatatable" rel="nofollow">arrayToDataTable</a> and the example states that I can use formatted values, like that:</p> <pre><code>var data = google.visualization.a...
0
MSB3411 Could not load Visual C++ component
<p>I have MS Visual Studio 2012 Ultimate and OS is Windows 7, and have nodeJs installed.I wanted to install socket.io using npm,but I get the following error.</p> <pre><code>C:\Users\NEW&gt;npm install socket.io npm http GET https://registry.npmjs.org/socket.io npm http 304 https://registry.npmjs.org/socket.io npm htt...
0
Class Based Views VS Function Based Views
<p>I always use FBVs (Function Based Views) when creating a django app because it's very easy to handle. But most developers said that it's better to use CBVs (Class Based Views) and use only FBVs if it is complicated views that would be a pain to implement with CBVs. </p> <p>Why? What are the advantages of using CBVs...
0
kubectl port forwarding timeout issue
<p>While using kubectl port-forward function I was able to succeed in port forwarding a local port to a remote port. However it seems that after a few minutes idling the connection is dropped. Not sure why that is so.</p> <p>Here is the command used to portforward:</p> <pre><code>kubectl --namespace somenamespace por...
0
when i wrote in my "npm cache clean" this error is occurring "npm ERR! Windows_NT 6.3.9600 npm ERR! argv
<p>when i wrote in my "npm cache clean" this error is occurring "npm ERR! Windows_NT 6.3.9600 npm ERR! argv</p> <pre><code>C:\iaAC&gt;npm cache clean npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs \\node_modules\\npm\\bin\\npm-cli.js" "cache" "clean" npm E...
0
Choose camera in file upload in cordova application on android without using cordova camera
<p>So i made a cordova app, i added android platform and made a simple html with an imput field</p> <pre><code>&lt;input type="file" capture="camera" accept="image/*" id="takePictureField"&gt; </code></pre> <p>I have added </p> <pre><code>&lt;uses-permission android:name="android.permission.CAMERA" /&gt; &lt;uses-f...
0
Encode String to UTF-8
<p>I have a String with a "ñ" character and I have some problems with it. I need to encode this String to UTF-8 encoding. I have tried it by this way, but it doesn't work:</p> <pre><code>byte ptext[] = myString.getBytes(); String value = new String(ptext, "UTF-8"); </code></pre> <p>How do I encode that string to utf-...
0
docker compose variable substitution
<p>It seems that I am not understanding something about variable substitution in the following page (my variable <code>NUM</code> is not registering): <a href="https://github.com/compose-spec/compose-spec/blob/master/spec.md#Interpolation" rel="nofollow noreferrer">https://github.com/compose-spec/compose-spec/blob/mast...
0
Using Twitter Bootstrap together with Wordpress
<p>How do I use Wordpress together with Twitter Bootstrap? I know how to set up a Wordpress page and I've already worked with Bootstrap, but now I want to use these two together for the first time.</p> <p>For my Wordpress projects I normally just installed Wordpress and started from scratch with creating a new theme. ...
0
java packages: cannot find symbol
<p>I'm having a strange error. I have 2 classes in the same package but they can't find each other. From what I remember, as long as the classes are in the same package, they should be able to call each other's methods. </p> <p>My code looks similar to this:</p> <p>in A.java:</p> <pre><code>package com.mypackage; pu...
0
SparseCheckout in Jenkinsfile pipeline
<p>In a jenkinsfile, I have specified the folderName through <strong>SparseCheckoutPaths</strong> which I want to checkout. But I am getting a whole branch checkout instead.</p> <pre><code> checkout([$class: 'GitSCM', branches: [[name: '*/branchName']], extensions: [[$class: 'SparseCheckoutPaths', pat...
0
Remove multiple items from list in Python
<p>So, for example, I got a list: <code>myList=["asdf","ghjk","qwer","tyui"]</code><br> I also have a list of index numbers of the items I want to remove: <code>removeIndexList=[1,3]</code> (I want to remove items 1 and 3 from the list above)</p> <p>What would be the best way to do this?</p>
0
How to use TLS 1.2 in Java 6
<p>It seems that Java 6 supports TLS up to v1.0, is there any way to use TLS 1.2 in Java 6?</p> <p>Maybe a patch or a particular update of Java 6 will have support for it?</p>
0
Flutter - Container width and height fit parent
<p>I have a <code>Card</code> widget which includes <code>Column</code> with several other Widgets. One of them is <code>Container</code>.</p> <pre><code>Widget _renderWidget() { return Column( children: &lt;Widget&gt;[ Visibility( visible: _isVisible, child: Container( ...
0
Get the number of digits in an int
<p>How do I detect the length of an integer? In case I had le: int test(234567545);</p> <p>How do I know how long the int is? Like telling me there is 9 numbers inside it??? </p> <p>*I have tried:**</p> <pre><code>char buffer_length[100]; // assign directly to a string. sprintf(buffer_length, "%d\n", 234...
0
How to move a marker in Google Maps API
<p>I'm using the Google Maps API V3 and I'm trying to make a marker move across the screen. Here's what I have:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta name="viewport" content="initial-scale=1.0, user-scalable=no" /&gt; &lt;style type="text/css"&gt; html { height: 100% } body { heig...
0
Cannot disable transition animation when back button is clicked
<p>When I click the back button to go back to previous activity, the transition slide still occur even though I have added overridePendingTransition. What is wrong with my code?</p> <p>I want to disable all transition between the activities. There is no animation on transition when going to new activity but slide out ...
0
How to validate TextBox value is string in C# Windows Form application
<p>I'm using a TextBox to enter user's name, here I want to <strong>validate that box only having alphabets</strong> which is starting with capital and continues with simple letters. For that I use the following code, even though its validating but if I enter a number after some alphabates it is not identifying that, p...
0
Figure out if a table has a DELETE on CASCADE
<p>Can I know if a database have <code>DELETE ON CASCADE</code> with a query?</p>
0
Change iOS view / view controller using swipe gesture
<p>How can I implement a swipe gesture to change view to and fro?</p> <p>The best example I've seen so far is the Soundcloud application but I couldn't figure out how to make it work.</p>
0
invokedynamic requires --min-sdk-version >= 26
<p>Today downloaded the studio 3.0 beta 2.0 version, after that tried to open an existing project in it and faced some difficulties, most of them I could solve with the help of Google and Stack Overflow, but this one I can not. </p> <pre><code>Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebu...
0
Set result format of Facebook Graph API to XML instead of JSON
<p>I'm trying to change the format of the result i get from the facebook graph api to XML.</p> <p>I use the format=xml parameter but that don't seem to work for me.</p> <p><a href="https://graph.facebook.com/me&amp;access_token=xxxxxxxxxxxx&amp;format=xml" rel="nofollow">https://graph.facebook.com/me&amp;access_token...
0
Check if PID exists in Bash
<p>I want to stall the execution of my BASH script until a process is closed (I have the PID stored in a variable). I'm thinking</p> <pre><code>while [PID IS RUNNING]; do sleep 500 done </code></pre> <p>Most of the examples I have seen use /dev/null which seems to require root. Is there a way to do this without requi...
0
sed script to print the first three words in each line
<p>I wonder how can I do the following thing with sed: I need to keep only the first three words in each line. For example, the following text:</p> <pre><code>the quick brown fox jumps over the lazy bear the blue lion is hungry </code></pre> <p>will be transformed in:</p> <pre><code>the quick brown the blue lion </c...
0
python - webdriver and asyncio
<p>Is it possible open browser for each task firstly, and load links after that ? This code raises an error </p> <pre><code>import asyncio from selenium import webdriver async def get_html(url): driver = await webdriver.Chrome() response = await driver.get(url) </code></pre> <p>TypeError: object WebDriver...
0
Cannot understand numpy argpartition output
<p>I am trying to use arpgpartition from numpy, but it seems there is something going wrong and I cannot seem to figure it out. Here is what's happening:</p> <p>These are first 5 elements of the sorted array <code>norms</code></p> <pre><code>np.sort(norms)[:5] array([ 53.64759445, 54.91434479, 60.11617279, 64.0963...
0
Better way for Getting id of the clicked Object in JavaFX controller
<p>I`m looking for a better way for getting the id of the clicked object inside the event handler for this object.</p> <p>I already found this:</p> <p><a href="https://stackoverflow.com/questions/14085076/javafx-pass-fxid-to-controller-or-parameter-in-fxml-onaction-method">javafx pass fx:id to controller or parameter...
0
Nginx variable for subdomain?
<p>I need a Guru's advice.</p> <p>On Nginx's <code>conf</code> file, I would like to get the subdomain as a variable in order to redirect accesses as follow.</p> <ul> <li>ACCESS: <code>http://userX.example.com/?hoo=bar</code></li> <li>REDIRECT: <code>http://example.com/userX/?hoo=bar</code></li> </ul> <p>But I get</...
0
How To Select multiple cells in DataGridView
<p>I have a DataGridView in my Form. The Functionality is as below.</p> <ul> <li>Clicking on header selects the whole column.</li> <li>Clicking on any cell other than the column header selects the entire row</li> </ul> <p>I have set multiselect to true. I am able to select multiple cells by using the mouse. but I wan...
0
Why is the first item in select menu always empty?
<p>Using CakePHP, I created select-option form element with:</p> <pre><code>echo $form-&gt;select('items', $numeration , array('selected' =&gt; 0)); </code></pre> <p>It creates selection box, but the first option is always empty.</p> <p>How can I get rid of that empty option? I did not manage to do anything with <co...
0
Python slice how-to, I know the Python slice but how can I use built-in slice object for it?
<p>What's the use of built-in function <code>slice</code> and how can I use it?<br> The direct way of Pythonic slicing I know - <code>l1[start:stop:step]</code>. I want to know if I have a slice object, then how do I use it?</p>
0
How can I get a Unicode character's code?
<p>Let's say I have this:</p> <pre><code>char registered = '®'; </code></pre> <p>or an <code>umlaut</code>, or whatever unicode character. How could I get its code?</p>
0
Dialog Box like JOptionPane in JavaFX
<p>I found this article <a href="http://code.makery.ch/blog/javafx-2-dialogs/" rel="nofollow noreferrer">JavaFX 2 Dialogs</a> and I am using it. But this dialog accepts only Stage Object. Is there any option to display dialog box which will accept AnchorPane as its parent. That Is similar to JoptionPane where we can pa...
0
$http request before AngularJS app initialises?
<p>In order to determine if a user's session is authenticated, I need to make a $http request to the server before the first route is loaded. Before each route is loaded, an authentication service checks the status of the user and the access level required by the route, and if the user isn't authenticated for that rout...
0
Removing double quotes from a string in Java
<p>How would I remove double quotes from a String?</p> <p>For example: I would expect <code>"abd</code> to produce <code>abd</code>, without the double quote.</p> <p>Here's the code I've tried:</p> <pre><code>line1 = line1.replaceAll("\"(\\b[^\"]+|\\s+)?\"(\\b[^\"]+\\b)?\"([^\"]+\\b|\\s+)?\"","\"$1$2$3\""); </code>...
0
How to handle Visual Studio 2010 Not Responding?
<p>First of all, I am not asking the same question here. ( This may be a duplicate post on Stack Overflow.) I have searched other solutions on <strong>MSDN</strong>, <strong>ASP .NET Forum</strong>, <strong>Stack Overflow</strong>, <strong>Code Project</strong> and everywhere on internet. But none of them solved my pro...
0
RTSP with iOS 8
<p>My partner and I are developing an app for a client where they have a camera that connects to the app. Currently it is running in http but we want to use RTSP. We scraped the internet today to look for possible ideas, but they all seem outdated. </p> <p>We tried incorporating <a href="https://github.com/durfu/DFURT...
0
how to represent enter key as char in c Language?
<p>I have tried this :</p> <pre><code>switch(c) case 13 : {printf("enter pressed");break;} </code></pre> <p>and this :</p> <pre><code>switch(c) case '\n' : {printf("enter pressed");break;} </code></pre> <p>but It didn't work out </p>
0
select distinct and one another column of the id
<p>I have a table with multiple columns but I need only 2.</p> <pre class="lang-sql prettyprint-override"><code>select id, department from tbl </code></pre> <p>If I want to use <code>distinct</code>, how do I do that? This is not working:</p> <pre class="lang-sql prettyprint-override"><code>select id, distinct departme...
0
Redirect C++ std::clog to syslog on Unix
<p>I work on Unix on a C++ program that send messages to syslog.</p> <p>The current code uses the <strong>syslog</strong> system call that works like printf.</p> <p>Now I would prefer to use a stream for that purpose instead, typically the built-in <strong>std::clog</strong>. But clog merely redirect output to stderr...
0
How to define a connection string to a SQL Server 2008 database?
<p>I'm using MS Visual Studio 2010 to create an application with SQL Server 2008 database access, but what I did to create the database was add a new "SQL Server 2008 Database Project", it added it, and shows me everything on my Solution Explorer, but how do I write the connection string to connect to it, because I wro...
0
Android SkImageDecoder::Factory returned null Error
<p>I'm trying to load an image from URL to an ImageView but the error occurs: SkImageDecoder::Factory returned null. How can I fix it?</p> <p>here is my code :</p> <pre><code>private class LoadImageFromURL extends AsyncTask&lt;String, Void, Bitmap&gt;{ ImageView bitmapImgView; public LoadImageFromURL(...
0
How do I click depending on state of toggle switch?
<p>I have a toggle switch I want to click depending on what the switch state is.</p> <p>If it is "span.switch-right" I want to do:</p> <pre><code>findElement(By.cssSelector("span.switch-left")).click(); </code></pre> <p>If it is "span.switch-left" I want to do:</p> <pre><code>findElement(By.cssSelector("span.switch...
0
What is the logic behind the TypeScript error "The operand of a 'delete' operator must be optional"?
<p>This is the new error that is coming in typescript code.</p> <p>I am not able to realize the logic behind it<br/> <a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-0.html#operands-for-delete-must-be-optional" rel="noreferrer">Documentation</a></p> <pre><code>/*When using the delete ope...
0
start/play embedded (iframe) youtube-video on click of an image
<p>I'm trying to start playing an embedded youtube video by clicking an image. The idea is to have an image on top of a video, and when the image is clicked it fades out and starts playing the video.</p> <p>I'm using jquery to fade the image, and was hoping to find a way to play or click the video using jquery as well...
0
ios UTF8 encoding from nsstring
<p>I am receiving a nsstring that is not properly encoded like "mystring%201, where must be "mystring 1". How could I replace all characters that could be interpreted as UTF8? I read a lot of posts but not a full solution. Please note that nsstring is already encoded wrong and I am not asking about how to encode char s...
0
Get random boolean in Java
<p>Okay, I implemented this SO question to my code: <a href="https://stackoverflow.com/questions/8878015/return-true-or-false-randomly">Return True or False Randomly</a></p> <p>But, I have strange behavior: I need to run ten instances simultaneously, where every instance returns true or false just once per run. And su...
0
how to make no limit on maxBufferSize and maxReceivedMessageSize
<p>I have an ASP.NET (C#) 4.0 WCF application. I got message error:</p> <blockquote> <p>Error : The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.</p> </blockquote> <p>I have increased it ...
0
Change default button label of <p:fileUpload mode="simple">
<p>I am using <code>&lt;p:fileUpload mode="simple"&gt;</code>. The button label shows differently in Chrome and Firefox. I would like it to be the same across browsers. I tried changing it by setting the <code>label</code> attribute as follows:</p> <pre><code>&lt;p:fileUpload label="Browse" ... mode="simple" /&gt; </c...
0
How does the @property decorator work in Python?
<p>I would like to understand how the built-in function <code>property</code> works. What confuses me is that <code>property</code> can also be used as a decorator, but it only takes arguments when used as a built-in function and not when used as a decorator.</p> <p>This example is from the <a href="http://docs.python....
0
How Should VSCode Be Configured To Support A Lerna Monorepo?
<p>I have a <a href="https://github.com/lerna/lerna" rel="noreferrer">lerna</a> monorepo containing lots of packages.</p> <p>I'm trying to achieve the following:</p> <ol> <li>Ensure that VSCode provides the correct import suggestions (based on package names, not on relative paths) from one package to another.</li> <l...
0
Google Docs viewer disable download
<p>Please take a look at this link</p> <p><a href="http://jsfiddle.net/C7Py6/3/" rel="noreferrer">http://jsfiddle.net/C7Py6/3/</a></p> <p>The last icon on google viewer's toolbar - <img src="https://i.stack.imgur.com/ztBWQ.png" alt="enter image description here"> enables user to view on new browser window and downloa...
0
React on Github Pages: gh-pages package not working
<h1>Problem</h1> <p>I am trying to put my React app on github pages. However, I can't even deploy the app to GitHub pages.</p> <h1>My Setup</h1> <p>I am using Visual Studio Code on my Windows 10 machine. I created my React app with <em>create-react-app</em>. I followed <a href="https://github.com/gitname/react-gh-pa...
0
Download iOS 6 simulator
<p>I have xcode 4.5.2 installed. I want to test my app in iOS 6. I went to <code>Xcode/Preferences/Downloads</code>, but I don't see iOS 6 simulator in the list. How should I download it? </p>
0
Getting children children in sitecore
<p>I'm trying to list items which have a set template on the parent page in Sitecore. So far I can do it for the children but I also want to include the children's children, i.e. anything under the parent if it has the chosen template it will work, this is my code in the c# file:</p> <pre><code>lvThing.DataSource = co...
0
Sum of two variables in RobotFramework
<p>I have two variables:</p> <pre><code>${calculatedTotalPrice} = 42,42 ${productPrice1} = 43,15 </code></pre> <p>I executed</p> <pre><code>${calculatedTotalPrice} Evaluate ${calculatedTotalPrice}+${productPrice1} </code></pre> <p>I got</p> <pre><code>42,85,15 </code></pre> <p>How can I resolve it?</p>
0
Bootstrap 4 navbar appearing vertically not horizontally
<p>I have built a Navbar exactly how it has been done on a tutorial yet somehow my navbar appears vertically when it should appear horizontally. Any ideas on how to fix this problem? Thanks in advance</p> <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snipp...
0
What is body-content class in bootstrap
<p>I am doing <a href="https://docs.microsoft.com/en-us/aspnet/core/client-side/bootstrap" rel="noreferrer">this</a> but I dont get what <strong>body-content</strong> class does. I am aware of <strong>container</strong> and <strong>container-fluid</strong>. Can someone explain or point me to bootstrap documentation for...
0
How to use like condition with multiple values in sql server 2005?
<p>I need to filter out records based on some text matching in nvarchar(1000) column. Table has more than 400 thousands records and growing. For now, I am using Like condition:-</p> <pre><code>SELECT * FROM table_01 WHERE Text like '%A1%' OR Text like '%B1%' OR Text like '%C1%' OR Text like '%...
0
How can I find MAX with relational algebra?
<p>Working with databases, how can I find MAX using relational algebra?</p>
0
Jenkins store workspace outside docker container
<p>So I have a Jenkins Master-Slave setup, where the master spins up a docker container (on the slave VM) and builds the job inside that container then it destroys the container after it's done. This is all done via the Jenkins' Docker <a href="https://wiki.jenkins-ci.org/display/JENKINS/Docker+Plugin" rel="nofollow no...
0
How do you read from a memory buffer c++
<p>I am fairly new at C++ and am trying to understand how memory manipulation works. I am used to Java and Python and haven't really been exposed to this. </p> <p>I am working on a project that has the following structure that doesn't quite make sense to me. </p> <pre><code>typedef struct { size_t size; char *dat...
0
Calling a function within PowerShell ISE
<p>Could someone tell me why I can not call a function within a PowerShell script? See below my code:</p> <pre><code>Write-Host "Before calling Function." testFunction function testFunction() { Write-Host "Function has been called" } </code></pre> <p>When I run the above code I get the following error message:...
0
Core Data VS Sqlite or FMDB....?
<p>Now this might look like a duplicate thread, but my question is that I have read a lot of questions like.. <a href="https://stackoverflow.com/questions/523482/core-data-vs-sqlite-3">Core Data vs SQLite 3</a> and others but these are 2-3 years old. I have also read that FMDB was developed as core data was not support...
0
What is the most pythonic way to check if multiple variables are not None?
<p>If I have a construct like this:</p> <pre><code>def foo(): a=None b=None c=None #...loop over a config file or command line options... if a is not None and b is not None and c is not None: doSomething(a,b,c) else: print "A config parameter is missing..." </code></pre> <p>W...
0
Styling of Select2 dropdown select boxes
<p>I'm using Select2 in a project to style some select boxes in a search form. I managed to change the gradient background of the arrow container to a black gradient:</p> <pre class="lang-css prettyprint-override"><code>.select2-container .select2-choice .select2-arrow { background-image: -khtml-gradient(linear, l...
0
axios post data format
<p>I want axios to post data like the following format(use jquery ajax.post)</p> <p><a href="https://i.stack.imgur.com/SwKuS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SwKuS.jpg" alt="enter image description here"></a></p> <pre><code>var data = {}; data.params = querystring.stringify({'cmd': '...
0
Using the AND and NOT Operator in Python
<p>Here is my custom class that I have that represents a triangle. I'm trying to write code that checks to see if <code>self.a</code>, <code>self.b</code>, and <code>self.c</code> are greater than 0, which would mean that I have Angle, Angle, Angle. </p> <p>Below you will see the code that checks for A and B, howeve...
0
Regex to match values not surrounded by another char?
<p>This is one of the toughest things I have ever tried to do. Over the years I have searched but I just can&rsquo;t find a way to do this &mdash; match a string not surrounded by a given char, like quotes or greater/less than symbols.</p> <p>A regex like this could match URLs not in HTML links, SQL table.column value...
0
jQuery load Wordpress pages via ajax
<p>I'm trying to setup a Wordpress theme which loads pages (not posts) with AJAX. I was following <a href="http://www.emanueleferonato.com/2010/04/01/loading-wordpress-posts-with-ajax-and-jquery/" rel="noreferrer">this guide</a> but haven't been able to get the correct pages to load.</p> <p>The links to the posts are...
0