title stringlengths 10 150 | body stringlengths 17 64.2k | label int64 0 3 |
|---|---|---|
How to give a variable path for GetFolder in VBScript? | <p>This script basically goes to a folder and list all the files in that folder and output it in a txt file. Now instead of defining the folder path I want it to use the txt file that contains a bunch of folder paths in it and I want to loop that txt file. How can I do this?</p>
<pre><code>Dim fso
Dim ObjFolder
Dim Ob... | 0 |
Force update of an Android app when a new version is available | <p>I have an app in Google Play Store. When an update version is available, the older version will become unusable – that is, if users do not update the app, they do not enter in the app. How can I force users to update the app when a new version becomes available?</p> | 0 |
How to play Youtube videos using Video.js? | <p>Is there a way to play Youtube videos using video.js? I followed the steps <a href="https://github.com/videojs/video.js/blob/94c07756dc1c3d301f25dd2ca54317335f6d4feb/docs/tech.md" rel="nofollow">here</a>
but can't seem to make it work. Please help! Thanks a lot!</p> | 0 |
Python AssertionError | <p>When I check the ISBN(DIGIT) with my code : check_digit_13(2000003294107)</p>
<pre><code>def check_digit_13(isbn):
assert len(isbn) == 12
sum = 0
for i in range(len(isbn)):
c = int(isbn[i])
if i % 2: w = 3
else: w = 1
sum += w * c
r = 10 - (sum % 10)
if r == 10: r... | 0 |
Send two argument using map and lambda functions and return two values | <p>I would like to send two arguments within a function and receive two values as well </p>
<p>I want to modify this code so that I code be able to send two arguments and receive two as well</p>
<pre><code>list_value = [ 1, 2,0,-1,-9,2,3,5,4,6,7,8,9,0,1,50]
hnd = map(lambda (valua): function_f(valua), list_value)
</c... | 0 |
What will happen to the SharedPreferences on update an Android App? | <p>I've stored user settings in the SharedPreferences in my App. What will happen with the SharedPreferences when I update the App via Google Play Store to a new version of the App?</p>
<p>Will the SharedPrefernces still be there after the update or will they be deleted?</p>
<p>So far I haven't found an answer on the w... | 0 |
python- constant dictionary? | <p>I simply generate a list of python dictionaries, and then serialize it to json.<br>
Basically my code is a loop where I do something like: </p>
<pre><code>ls.append({..values..})
</code></pre>
<p>I don't change the dictionaries after this. </p>
<p>The question, is there a constant dictionary in python, obviousl... | 0 |
In django do models have a default timestamp field? | <p>In django - is there a default timestamp field for all objects? That is, do I have to explicitly declare a 'timestamp' field for 'created on' in my Model - or is there a way to get this automagically?</p> | 0 |
How can I open files externally in Emacs dired mode? | <p>I want to open a pdf with evince instead of DocView mode. Is there a possibility to open a file with a specific command like 'evince'?</p> | 0 |
COLLECT_SET() in Hive, keep duplicates? | <p>Is there a way to keep the duplicates in a collected set in Hive, or simulate the sort of aggregate collection that Hive provides using some other method? I want to aggregate all of the items in a column that have the same key into an array, with duplicates.</p>
<p>I.E.:</p>
<pre><code>hash_id | num_of_cats
======... | 0 |
how to parse json array using Litjson? | <p>I am developing an application in which i am using data came from server in the json format.
However i am able to parse normal json data but failed to parse the json data with arrays,</p>
<p>the json response is given below,</p>
<pre><code>[{"id_user":"80","services":
[{"idservice":"3","title":"dni-e","message... | 0 |
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'stringi' | <p>When I use</p>
<pre><code>library(Hmisc)
</code></pre>
<p>I get the following error</p>
<pre><code> Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : there is no package called 'stringi'
Error: package 'ggplot2' could not be loaded
</code></pre>
<p>As well, if I use </p>
<pre><... | 0 |
How to save image path into database in Laravel? | <p>I want to upload an image and retrieve in from database when i need this.My code is perfectly working to upload image but it's path did not save in database.In database it's showing <code>Null</code>.Here is my code:</p>
<pre><code> if ($request->hasFile('profilePic')) {
$file = array('profilePic' =&g... | 0 |
jquery change background color user scroll | <p>Is it possible with jquery that when a user scrolls down the page that the background animate from 50% white to 90% white or someting?</p>
<p>So first it is the color <code>rgba(255,255,255,.5)</code> and when a user scroll 210px below the color <code>become rgba(255,255,255,.9)</code>.</p> | 0 |
CSS Text Align Bottom of Container | <p>I have a header which has a large image floated on one side, and a small paragraph of text on the other side. I want the paragraph to start at the bottom of the header div. If there were 5 lines in the paragraph, I want the last line to be at the bottom of the header. I'm having trouble getting the paragraph to al... | 0 |
How create a batch file that opens a 32bit cmd prompt as Admin to run another batch file | <p>I have a batch file that I currently have to do the following to run:</p>
<ol>
<li>Open SYSWOW64\cmd.exe as admininstrator (it's a 32bit application)</li>
<li>cd c:\mybatchfilelocation\</li>
<li>then run my batch file batchfile.bat</li>
</ol>
<p>I'd like to just be able to run one batch as admin that automatically... | 0 |
restore_best_weights issue keras early stopping | <p>I am using EarlyStopping from Keras for my deep learning project. The documentations <a href="https://keras.io/callbacks/#earlystopping" rel="noreferrer">here</a> mentions a very useful idea of restoring best weights. But somehow I am not able to use it yet. I am using Keras 2.2.2/TF 1.10, installed using Anaconda. ... | 0 |
Problems with Chinese Fonts in iText-PDF on Windows Machines | <p>I'm using a Ubuntu-PC to create PDFs with iText which are partly in Chinese. To read them I use Evince. So far there were hardly any problems</p>
<p>On my PC I tried the following three BaseFonts and they worked with success:</p>
<pre><code>bf = BaseFont.createFont("MSungStd-Light", "UniCNS-UCS2-H", BaseFont.NOT_E... | 0 |
Binary file in npm package | <p>I try to create an npm package, which can be started as a command from shell. I have <code>package.json</code></p>
<pre><code>{
"name": "myapp",
"version": "0.0.6",
"dependencies": {
"async": "",
"watch": "",
"node-promise": "",
"rmdir": "",
"should": "",
"websocket": ""
},
"bin": ... | 0 |
Datatables export buttons not showing, | <p>I want to export the Data from data table, I've tried everything I could, I've read All the questions and answers of stackoverflow and the documentation about those buttons issues till the google's second page, </p>
<p>I'm sure I've referenced all The required javascript's cdn and CSS as required, No error in conso... | 0 |
What should I pass for the WWW-Authenticate header on 401s if I'm only using OpenID? | <p>The HTTP spec states:</p>
<blockquote>
<p><strong>10.4.2 401 Unauthorized</strong></p>
<p>The request requires user authentication. The response MUST include a WWW-Authenticate
header field (section 14.47) containing a challenge applicable to the requested resource. </p>
</blockquote>
<p>If the only login... | 0 |
Import DBF files into Sql Server | <p>I need a little help figuring this out because I'm new to stored procedures. I am trying to import a .DBF table into Sql Server 2008 using this store procedure.</p>
<pre><code>CREATE PROCEDURE spImportDB
-- Add the parameters for the stored procedure here
AS
BEGIN
-- Insert statements for procedure here
SELECT ... | 0 |
How do I convert a file's format from Unicode to ASCII using Python? | <p>I use a 3rd party tool that outputs a file in Unicode format. However, I prefer it to be in ASCII. The tool does not have settings to change the file format.</p>
<p>What is the best way to convert the entire file format using Python?</p> | 0 |
Compare object instances for equality by their attributes | <p>I have a class <code>MyClass</code>, which contains two member variables <code>foo</code> and <code>bar</code>:</p>
<pre><code>class MyClass:
def __init__(self, foo, bar):
self.foo = foo
self.bar = bar
</code></pre>
<p>I have two instances of this class, each of which has identical values for <... | 0 |
Detect in Javascript when HTML5 <video> loop restarts? | <p>I have a looping HTML5 video using <code><video loop="true"></code>, and I want to know when the video loops. The event listener <code>play</code> only fires when the video is started initially, and <code>ended</code> never fires. </p>
<p>The imprecise nature of <code>timeupdate</code> makes me nervous using ... | 0 |
send JSON to server via HTTP put request in android | <p>How to wrap given json to string and send it to server via Http put request in android?</p>
<p>This is how my json look like. </p>
<pre><code> {
"version": "1.0.0",
"datastreams": [
{
"id": "example",
"current_value": "333"
},
{
"id": "key",
... | 0 |
Kotlin sequence concatenation | <pre><code>val seq1 = sequenceOf(1, 2, 3)
val seq2 = sequenceOf(5, 6, 7)
sequenceOf(seq1, seq2).flatten().forEach { ... }
</code></pre>
<p>That's how I'm doing sequence concatenation but I'm worrying that it's actually copying elements, whereas all I need is an iterator that uses elements from the iterables (seq1, seq... | 0 |
How to use Spring Data JPA Repository to query from 2 tables? | <p>I have 2 tables say Student and Teacher and say Student has a Many-To-One relationship to Teacher and say, teacherId serves as the foreign key.</p>
<p>How can I use spring data JPA repo methods, in a way - <code>findByTeacherName</code>, if I want to query something like below,</p>
<pre><code>select * from Student... | 0 |
CS0120: An object reference is required | <p>Getting this error when I submit my form to savetext.aspx action file:</p>
<pre><code>Compiler Error Message: CS0120: An object reference is required for the nonstatic field, method, or property 'System.Web.UI.Page.Request.get'
</code></pre>
<p>On this line:</p>
<pre><code>string path = "/txtfiles/" + Request.For... | 0 |
How to always visible scroller of Tableview in Obj c? | <p>I want to show user there is a more content below but UITableView only shows scroll indicator when we scroll the tableview. There is any way, so I can show scroll indicator always</p> | 0 |
Vertical/Column text select in PyCharm? | <p>Is it possible to select text vertically/in a column in PyCharm? You can do it in Visual Studio and Notepad++ by holding down alt+arrow keys.</p>
<p>The documentation describes how to do it with the mouse, but there's no mention of keyboard options.</p>
<p><a href="http://www.jetbrains.com/pycharm/webhelp/selectin... | 0 |
Cross Domain Web Worker? | <p>I have <a href="https://domain1.com" rel="nofollow noreferrer">https://domain1.com</a> (domain1) and <a href="https://domain2.com" rel="nofollow noreferrer">https://domain2.com</a> (domain2).</p>
<p>Domain2 serves a page containing javascript with this header:</p>
<pre><code>"Access-Control-Allow-Origin: *"... | 0 |
how to get the dynamic column header and result from ajax call in jquery datatable | <p>I want to display the dynamic column header along with the results in datatable.In aaData and aoColumns attributes has to get result data and columns name from ajax call, Please suggest me how to do this or give me some alternate solution to get the dynamic data and column header from ajax call, Here is my code.:</p... | 0 |
Mysql to select month-wise record even if data not exist | <p>I wrote a query to get month-wise record in user table as follows</p>
<pre><code>SELECT COUNT( `userID` ) AS total, DATE_FORMAT( `userRegistredDate` , '%b' ) AS
MONTH , YEAR( `userRegistredDate` ) AS year
FROM `users`
GROUP BY DATE_FORMAT( FROM_UNIXTIME( `userRegistredDate` , '%b' ) )
</code></pre>
<p>Output:</p>
... | 0 |
Apply Function on DataFrame Index | <p>What is the best way to apply a function over the index of a Pandas <code>DataFrame</code>?
Currently I am using this verbose approach:</p>
<pre><code>pd.DataFrame({"Month": df.reset_index().Date.apply(foo)})
</code></pre>
<p>where <code>Date</code> is the name of the index and <code>foo</code> is the name of the ... | 0 |
UIGraphicsGetCurrentContext vs UIGraphicsBeginImageContext/UIGraphicsEndImageContext | <p>I am new to these parts of iOS API and here are some questions that are causing an infinite loop in my mind</p>
<ol>
<li><p>Why does ..BeginImageContext have a size but ..GetCurrentContext does not have a size? If ..GetCurrentContext does not have a size, where does it draw? What are the bounds?</p></li>
<li><p>Why... | 0 |
Javascript call to Swift from UIWebView | <p>I am trying to make a call from a javascript function in a UIWebView to Swift in iOS 10. I have setup a very basic project just to try and get this working, the code is below. </p>
<pre><code>import UIKit
class ViewController: UIViewController, UIWebViewDelegate {
@IBOutlet var webView: UIWebView!
over... | 0 |
How to split data (raw text) into test/train sets with scikit crossvalidation module? | <p>I have a large corpus of opinions (2500) in raw text. I would like to use scikit-learn library to split them into test/train sets. What could be the best aproach to solve this task with scikit-learn?. Could anybody provide me an example of spliting raw text in test/train sets (probably i´ll use tf-idf representation... | 0 |
element not visible: Element is not currently visible and may not be manipulated - Selenium webdriver | <p>Following is the html</p>
<pre><code><div id="form1:customertype" class="ui-selectonemenu ui-widget ui-state-default ui-corner-all ui-state-hover" style="width: 165px;">
<div class="ui-helper-hidden-accessible">
<select id="form1:customertype_input" name="form1:customertype_input" tabindex="... | 0 |
App limit on a single Heroku account | <p>Is there a limit to the number of apps I can host with a single Heroku account?</p>
<p>I currently run multiple apps each using 1 dyno for free. But could I host hundreds (or even thousands) of small applications for free?</p>
<p>I also know there is a 2TB bandwidth soft limit, but is there any other limitation I ... | 0 |
Multipart requests/responses java | <p>I have a task to implement sending of http multipart request and interpreting http multipart response. I decided to start from the response as I just have to receive a response and parse it. I have not that much experience with java and even less with HTTP and that is why I read some articles and other stuff on the ... | 0 |
Display image from URL, Swift 4.2 | <p>I am a fairly decent Objective C developer, and I am now learning Swift (of which I am finding quite difficult, not only because of new concepts, such as optionals, but also because Swift is continually evolving, and much of the available tutorials are severely outdated).</p>
<p>Currently I am trying parse a JSON f... | 0 |
Laravel customer API resource with relationships | <blockquote>
<p>Controller function:</p>
</blockquote>
<pre><code>public function index () {
// TESTED
// The getAllActiveSuppliers() function just return Supplier::pagniate(10)
$suppliers = $this -> model -> getAllActiveSuppliers();
return new SupplierResource($suppliers);
}
</code></pre>
<bl... | 0 |
How should I use ejs to render table vertically? | <p>I have an array like the following:</p>
<pre><code>quotation: [{
"dimension" : 0,
"currency": "RMB",
"quantity": "100",
"price": "3",
"factory": "rx"},
{
"dimension" : 0,
"currency": "RMB",
"q... | 0 |
Can we have multiple <tbody> in same <table>? | <p>Can we have multiple <code><tbody></code> tags in same <code><table></code>? If yes then in what scenarios should we use multiple <code><tbody></code> tags?</p> | 0 |
Using G++ to compile multiple .cpp and .h files | <p>I've just inherited some C++ code that was written poorly with one cpp file which contained the main and a bunch of other functions. There are also <code>.h</code> files that contain classes and their function definitions.</p>
<p>Until now the program was compiled using the command <code>g++ main.cpp</code>. Now tha... | 0 |
How to add data dynamically in JSON object | <p>Sample code</p>
<pre><code>var mydata = [ {id:"1",invdate:"2007-10-01",name:"test",note:"note",amount:"200.00",tax:"10.00",total:"210.00"}, {id:"2",invdate:"2007-10-02",name:"test2",note:"note2",amount:"300.00",tax:"20.00",total:"320.00"}];
</code></pre>
<p>I have to get output something like above, have to add dy... | 0 |
How to create a wireless hotspot from 3G connection in iOS | <p>If I wanted to, how would I create an app like <a href="http://intelliborn.com/mywi.html" rel="noreferrer">MyWi</a>, i.e. a wifi tethering app? What are the steps to achieve this functionality? What frameworks/libraries would I need to use? </p>
<p>The goal is not to try to get this app into the app store, but to h... | 0 |
Showing list empty message at the center of the screen in a FlatList using ListHeaderComponent | <p>I am using React-Native version 0.43.0 which does not support ListEmptyComponent of FlatList. Hence I am using ListHeaderComponent to render a view when the list is empty, </p>
<pre><code>import React, { Component } from 'react';
import { Text, View, StyleSheet,FlatList } from 'react-native';
class App extends Com... | 0 |
Host is not allowed to connect to this MySQL server for client-server application | <p>I just exported my tables from one web host to another (AWS).
Thinking everything would go smoothly (yeah right), well, everything that can go wrong has gone wrong.</p>
<p>I get this error when trying to query my database (which I didn't get before):</p>
<p><code>SQLSTATE[HY000] [1130] Host '<my ip address>'... | 0 |
How to retain slf4j MDC logging context in CompletableFuture? | <p>When executing async <code>CompletableFuture</code>, the parent threadcontext and moreover the <code>org.slf4j.MDC</code> context is lost.</p>
<p>This is bad as I'm using some kind of "fish tagging" to track logs from one request among multiple logfiles. </p>
<p><code>MDC.put("fishid", randomId())</code></p>
<p>Q... | 0 |
'GridView1' fired event PageIndexChanging which wasn't handled | <p>I am using a gridview and I want to use paging. I have already set allow paging to true and page size to 5. I can see the numbers at the base of my gridview, but when i click on a number to move to respective page, it throws an error saying:</p>
<p><code>The GridView 'GridView1' fired event PageIndexChanging whic... | 0 |
serving gzipped files on Firebase Hosting | <p>I am interested in serving gzipped html/css/js files using Firebase Hosting. I tried setting the Content-Encoding header in firebase.json, but it errors on deploy.</p>
<p>purportedly, the only headers you can set include: Cache-Control,Access-Control-Allow-Origin,X-UA-Compatible,X-Content-Type-Options,X-Frame-Opti... | 0 |
How to find all assets of a type? | <p>In my Unity project a have several instanced of the class ArmourType (these are assets, scriptable objects). I'm trying to show these in a dropdown list in the inspector, and this works. However, I use </p>
<pre><code>List<ArmourType> armourTypes = Resources.FindObjectsOfTypeAll<ArmourType>();
</code></... | 0 |
Why my turn server doesn't work? | <p>I can connect in any situation when using <a href="https://appr.tc" rel="noreferrer">appr.tc</a> ice servers (google turn servers). but i can't connect with my own turn server.
I did config my own turn server by <code>coturn project</code>. </p>
<p>I'm using google's <code>libjingle_peerconnection</code> api to cre... | 0 |
How to update version of Microsoft.NETCore.App SDK in VS 2017 | <p>I have ASP.NET Core API project which was initially developed using VS 2015. I installed VS 2017 and let it convert the project.<br />
Then i goto Project Properties -> Application ->Target framework and change the target framework to .NETCoreApp 1.1.</p>
<p>as soon as i do that i get 2 errors</p>
<blockquote... | 0 |
How can I *only* get the number of bytes available on a disk in bash? | <p><code>df</code> does a great job for an overview. But what if I want to set a variable in a shell script to the number of bytes available on a disk?</p>
<p>Example:</p>
<pre><code>$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda 1111111111 2222222 33333333 10% /
tmpfs... | 0 |
problems after installing java 8 | <p>Android Studio had a popup telling updates was available after i run the SDK manager and started the Android Studio again I got another popoup that toke me to Androids website where it told me that I should upgrade to Java JDK 8 and JRE 8 after I did i got over 235 errors when try to run the debug. I uninstalled ver... | 0 |
Adding items to a ComboBox that is added to userform during run time | <p>I am trying to add a combo box to a user form which will be created at run time , the problem I am facing is to add items to the combo box? Not able to figure out where the mistake would be. Thanks.</p>
<pre><code> Function addComboBox(ByRef TempForm As Object, ByVal controlType As String,
ByVal pos As Integer,... | 0 |
How to learn Operating System in depth and implement own OS | <p>I am learning Operating Systems, their different perspectives like different scheduling algorithms etc. My question is: Can I make my own OS as a final year project? Please suggest some good resources (i.e video training is appreciated) that helps me understand and mainly gives me the ability to DEVELOP at least a S... | 0 |
The space above and below the legend using ggplot2 | <p>If you look at the charts <a href="http://markthegraph.blogspot.com.au/2012/08/credit-aggregates-july-2012.html">here</a>! you can see there is a lot of white space above and below the legend. I wish to reduce the amount of space.</p>
<p>Example code:</p>
<pre><code>library(ggplot2)
library(gridExtra)
library(resh... | 0 |
Ways to extend Array object in javascript | <p>i try to extend Array object in javascript with some user friendly methods like Array.Add() instead Array.push() etc...</p>
<p>i implement 3 ways to do this.
unfortunetly the 3rd way is not working and i want to ask why? and how to do it work.</p>
<pre><code>//------------- 1st way
Array.prototype.Add=function(ele... | 0 |
Javascript/jQuery encoding for special characters when using val() | <p>I have a problem with special characters like &, ä, etc. and their corresponding HTML encoded writing like <code>&amp;</code>, <code>&auml;</code> etc.</p>
<ul>
<li><p>When they are used in the value tag of input fields, the browser decodes it automatically, no problem at all.</p></li>
<li><p>When using... | 0 |
Converting hours in decimal format | <p>I've tried mutliple solutions to this problem but I can't seem to get it.</p>
<p>I have time in decimal format, which is in hours. I want to make it much cleaner by changing it into a DD:HH:MM:SS format.</p>
<h2>Example:</h2>
<p><strike>10.89 hours == 10 hours, 53 minutes, 40 seconds</strike></p>
<p><strong>EDIT... | 0 |
How to create EditText with cross(x) button at end of it? | <p>Is there any widget like <code>EditText</code> which contains a cross button, or is there any property for <code>EditText</code> by which it is created automatically? I want the cross button to delete whatever text written in <code>EditText</code>.</p> | 0 |
Selection of First L Items of ArrayList of size N > L and Insertion to Another ArrayList in Java | <p>I have an ArrayList l1 of size N and another l2 of size L < N. I want to put the L first items of l1 to l2. I thought to use the for loop of type for(Object obj : l1) to scan my list of size N and then use l2.add(obj) to add elements on l2, but I am not sure if when I reach the max size of l2 (i.e. L) stops inser... | 0 |
Null Pointer Exception when setting LayoutParams | <p>I created button in activity programmaticaly, not in xml file. Then I wanted to set it LayoutParams like in this link: <a href="https://stackoverflow.com/questions/4638832/how-to-programmatically-set-the-layout-align-parent-right-attribute-of-a-button">How to programmatically set the layout_align_parent_right attrib... | 0 |
Setting cookie for different domain from javascript | <p>I am trying to set cookie to domain same as src of js file.</p>
<p>Scenario:
In <strong>www.xyz.com</strong> html, I have included js file from qwe.com as below</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>&... | 0 |
Rad grid custom filtering | <p>How can I activate custom filtering for my radgrid?(I googled but I didn't get any proper response regarding this)
I have a property like AllowCustomSorting but I don't have any property regarding filtering.
Can any one provide the way how to implement custom filtering?
If possbile give me a sample page then I will... | 0 |
Passing a parameter to an sql stored procedure in c# | <pre><code> string commandGetIslemIdleri = ("EXEC GetIslemIdleri");
cmd = new SqlCommand(commandGetIslemIdleri, sqlConn);
cmd.Parameters.Add(new SqlParameter("@CARIID", 110));
using (var reader = cmd.ExecuteReader()) //error occurs here
{
while (reader.Read())
... | 0 |
NGINX Multiple Site Setup | <p>Basically, my NGINX setup is working fine for 2 of my sites but adding a third redirects to the second one. </p>
<pre><code>server {
listen 80;
root /var/www/html/link.com/public/;
index index.php index.html index.htm index.nginx-debian.html;
server_name www.link.com link.com;
location / {
... | 0 |
Implementing a slider (SeekBar) in Android | <p>I want to implement a slider, which is basically two lines, one vertical and one horizontal, crossing where the screen is touched. I have managed to make one but I have to issues:</p>
<ol>
<li>The slider is not very smooth, there is a slight delay when I'm moving the finger</li>
<li>If I place two sliders it is not... | 0 |
bytes/hexa to human readable value? | <p>I want to learn packet decoder processing using <a href="http://www.code.google.com/p/dpkt" rel="nofollow">dpkt</a>. On the site, I saw the following example code:</p>
<pre><code>>>> from dpkt.ip import IP
>>> from dpkt.icmp import ICMP
>>> ip = IP(src='\x01\x02\x03\x04', dst='\x05\x06\x0... | 0 |
How to take values of only selected checkbox in Action class in Struts 2 and JSP | <p>I am displaying 24 checkboxes. I want to get all the values of checked checkboxes in action class and insert it as a new record inside database.Inserting will be done once I succeed in getting the values of checked checkboxes on button click.</p>
<p>I referred <a href="https://stackoverflow.com/questions/6800008/how... | 0 |
How can I insert a newline into a TextBlock without XAML? | <p>I have created a WPF <code>TextBlock</code> inside a <code>Label</code> <strong>in code</strong> (XAML is not possible in my case) as follows:</p>
<pre><code>Label l = new Label();
TextBlock tb = new TextBlock();
l.Content = tb;
</code></pre>
<p>I then come to a situation where I need to set the <code>.Text</code>... | 0 |
how can I used the “pefile.py” to get file(.exe) version | <p>I want to used python to get the executed file version, and i know the <a href="http://code.google.com/p/pefile/" rel="nofollow noreferrer">pefile.py</a></p>
<p>how to used it to do this?</p>
<p>notes: the executed file may be not completely.</p> | 0 |
Load external JS from bookmarklet? | <p>How can I load an external JavaScript file using a bookmarklet? This would overcome the URL length limitations of IE and generally keep things cleaner.</p> | 0 |
When to use ref and when it is not necessary in C# | <p>I have a object that is my in memory state of the program and also have some other worker functions that I pass the object to to modify the state. I have been passing it by ref to the worker functions. However I came across the following function.</p>
<pre><code>byte[] received_s = new byte[2048];
IPEndPoint tmpIpE... | 0 |
Wrap a delegate in an IEqualityComparer | <p>Several Linq.Enumerable functions take an <code>IEqualityComparer<T></code>. Is there a convenient wrapper class that adapts a <code>delegate(T,T)=>bool</code> to implement <code>IEqualityComparer<T></code>? It's easy enough to write one (if your ignore problems with defining a correct hashcode), but ... | 0 |
iOS RTMP streaming library - LFLiveKit vs VideoCore lib vs alternative | <p>We're using VideoCore lib for a live streaming app and started to reach certain limits e.g. project maintenance, saving the stream, portrait-oriented video formatting, external camera sources, etc.</p>
<p>Looking for an alternative iOS RTMP streaming library, one that is more up to date. Any tested suggestions? Tha... | 0 |
Android mobile user agent? | <p>I'm currently making an android application for a forum, basically it just loads the website in a webview and that works fine and all, but I'm trying to add an option to view the full site or the mobile site. </p>
<p>I got it working by just making a boolean BrowserType which when set to true, loads the mobile site... | 0 |
Sql Function Issue "The last statement included within a function must be a return statement" | <p>In the below SQL function I have to return value based on condition but it throws a error.</p>
<blockquote>
<p>"The last statement included within a function must be a return
statement."</p>
</blockquote>
<p>Pls help me to overcome this issue.</p>
<pre><code>ALTER FUNCTION [dbo].[GetBatchReleaseQuantity]
(... | 0 |
jQuery post a serialized form then inserting into mysql via php? | <p>I'm trying to post a serialized form to a sumbit.php file, in turn, will then insert into a MySQL database; however, the last input which is hidden, is not getting inserted into the database, though the rest are.</p>
<p>Here's some snippet examples of what I've got thus far which is not working: </p>
<p><strong>H... | 0 |
How to conclude your merge of a file? | <p>After I merged a file in Git I tried to pull the repository but error came up:</p>
<blockquote>
<p>You have not concluded your merge. (MERGE_HEAD exists)</p>
</blockquote>
<p>How does one conclude a merge?</p> | 0 |
Tee does not show output or write to file | <p>I wrote a python script to monitor the statuses of some network resources, an infinite pinger if you will. It pings the same 3 nodes forever until it receives a keyboard interrupt. I tried using tee to redirect the output of the program to a file, but it does not work:</p>
<pre><code>λ sudo ./pingster.py
15:43:33 ... | 0 |
Icon specified in info.plist not found under the top level app wrapper | <p>I'm trying to upload my binary to iTunes Connect using Applicaton Loader. When I select the file and hit send, it sends for about a second and then this error pops up,</p>
<blockquote>
<p>Icon specified in the info.plist not found under the top level app wrapper: Default -Landscape@2x~ipad.png </p>
</blockquote>
... | 0 |
JPQL: convert varchar to number | <p>How can i convert varchar to number in JPQL ???</p>
<p>I managed to do that in sql (Oracle) with this query:</p>
<pre><code>SELECT Decode(Upper(column_name), Lower(column_name), To_Number(column_name), -1)
FROM table
</code></pre>
<p>I want to do this conversion with JPQL.</p>
<p>Thanks for your help </p> | 0 |
linking one jsp page to another jsp page | <p>This is a very simple question, but as I am a newbie...</p>
<p>I have two files: login.jsp and report.jsp
they are both within the same WebContent folder. </p>
<p>I want a link on report.jsp that when clicked, will take me to login.jsp </p>
<p>The jsp part of the page looks like: </p>
<pre><code>Connection conn ... | 0 |
dynamically changing height of #container div in flexslider | <p>I'm working with flexslider and the container div has a background image that acts like a border set to the bottom of it. What I need to do is get the container div to be responsive like the actual flexslider div. So when you shrink the window from right to left, the height of the container div should change height,... | 0 |
Python: How can add words to a list? | <p>Okay, the Title is a bit vague, but what I'm trying to do is download data online, parse it and then put the parsed 'data' into an excel file. </p>
<p>I'm getting stuck in trying to put the data into a vector or list. Note that, the data can be either words or numbers. Also, I the length of the data is unknown. I t... | 0 |
How do you convert a string into base64 in .net framework 4 | <p>So I've been going around the internet looking for a way to convert regular text(string) into base64 string and found many solutions. I'm trying to use:</p>
<pre><code>Dim byt As Byte() = System.Text.Encoding.UTF8.GetBytes(TextBox1.Text)
TextBox2.Text = convert.ToBase64String(byt)
</code></pre>
<p>but it end up wi... | 0 |
Swiper.js - Uncaught TypeError: Cannot read property 'params' of null | <p>I'm using swiper.js and once swiper1.destroy(); run, rebuild, slide to a certain slide and click.</p>
<p>I got error of <strong>swiper.js:438 Uncaught TypeError: Cannot read property 'params' of null</strong></p>
<p>Here's the code. I appreciate all helps. Thank you very much.</p>
<pre><code>$('.call').click(fun... | 0 |
%D field in Apache access logs - first or last byte? | <p>The Apache Httpd manual has a section on <a href="http://httpd.apache.org/docs/current/mod/mod_log_config.html#formats" rel="noreferrer">custom access log formats</a>. One of these options is the <code>%D</code> field, which is documented as</p>
<blockquote>
<p>The time taken to serve the request, in microsecond... | 0 |
How to put a UITextField inside of a UITableViewCell (grouped)? | <p>How to put a UITextField inside of a UITableViewCell (grouped)? I want a user to be able to edit it.</p> | 0 |
WPF Databinding With A Collection Object | <p>I have a simple class as defined below:</p>
<pre><code>public class Person
{
int _id;
string _name;
public Person()
{ }
public int ID
{
get { return _id; }
set { _id = value; }
}
public string Name
{
get { return _name; }
set { _name = value; }
... | 0 |
What's the observable equivalent to `Promise.reject` | <p>I had this code</p>
<pre><code> return this.http.get(this.pushUrl)
.toPromise()
.then(response => response.json().data as PushResult[])
.catch(this.handleError);
</code></pre>
<p>I wanted to use <code>observable</code> instead of <code>Promise</code></p>
<p>how can i return the error... | 0 |
Add tags when creating product in Magento? | <p>The "Product Tags" tab would only appear after a product has been created. Even then, there doesn't seem a way to add tags to a product - it only displays them when you are editing the product and I see only "Reset Filter" and "Search" buttons.</p>
<p>So the tags are only for customers? Not administrators?</p>
<p>... | 0 |
VisualStudio Code PHP executablePath in docker | <p>I try to configure VSCode to use our php executable inside a docker container. Firstly i tried it on a macintosh and everything works as expected. At work we use windows pc´s and i cant get it to work.</p>
<p><strong>Workspace Settings</strong></p>
<pre><code>"php.suggest.basic": false,
"php.executablePath": "C:\\... | 0 |
How to install php yaml on CentOs? | <p>On the start I was getting this error:</p>
<pre><code>Call to undefined function yaml_parse_file()
</code></pre>
<p>I have tried everything what I have found over google:</p>
<pre><code>yum install libyaml
yum install yaml
yum install perl-yaml
</code></pre>
<p>and etc.</p>
<p>Now I'm getting:</p>
<pre><code>P... | 0 |
ReactNative PanResponder limit X position | <p>I'm building a Music Player and I'm focusing on the progress bar.
I was able to react to swipe gestures, but I cant limit how far that gesture goes.</p>
<p>This is what I've done so far. I've reduced everything to the minumal:</p>
<pre class="lang-js prettyprint-override"><code>constructor(props) {
super(props... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.