I am serializing an structure into a MemoryStream and I want to save and load the serialized structure.
So, How to Save a MemoryStream into a file and also load it back from file?..
I am trying to write an object to an Xml string and take that string and save it to a DB. But first I need to get the string...
private static readonly Encoding LocalEncoding = Encoding.UTF8;
..
I am writing a program to attach a file to email. Currently I am saving file using FileStream into disk, and then I use
System.Net.Mail.MailMessage.Attachments.Add(
new System.Net.Mail.Attachmen..
I'm having an issue with serializing using memory stream. Here is my code:
/// <summary>
/// serializes the given object into memory stream
/// </summary>
/// <param name="objectType"&..
I have the following constructor method which opens a MemoryStream from a file path:
MemoryStream _ms;
public MyClass(string filePath)
{
byte[] docBytes = File.ReadAllBytes(filePath);
_ms = ..
Someone please explain the difference between java.lang.RuntimeException and java.lang.Exception? How do I decide which one to extend if I create my own exception?..
I downloaded this: https://github.com/mongodb/mongo-c-driver
And now I'm trying to use it inside my C program, but I don't know what to do with the generated .a files. What are they? I couldn't find ..
I need to run a command at terminal in Fedora 16 from a JAVA program. I tried using
Runtime.getRuntime().exec("xterm");
but this just opens the terminal, i am unable to execute any command.
I als..
How can I use comments inside the render method in a React component?
I have the following component:
'use strict';
var React = require('react'),
Button = require('./button'),
UnorderedList =..
I have the following code:
if(!partialHits.get(req_nr).containsKey(z) || partialHits.get(req_nr).get(z) < tmpmap.get(z)){
partialHits.get(z).put(z, tmpmap.get(z));
}
where partialHits ..
If you scroll down the page in the following URL, the 'share' div will lock onto the browser:
http://knowyourmeme.com/memes/pizza-is-a-vegetable
I'm assuming they are applying a position: fixed; att..
The story is, I should be able to put Bob, Sally and Jack into a box. I can also remove either from the box. When removed, no slot is left.
people = ["Bob", "Sally", "Jack"]
I now need to remove, s..
I have installed Visual Studio 2017 RC, and by default it set language to my system language (Polish) so I was trying to change it to EN but in Options > Environment > International Settings i have on..
Is it possible to set up files/folders to ignore on a per-project basis in TFS source control?
For example, I've a website with an assets folder that I do not want to go in to source control. These a..
When manually generating a JSON object or array, it's often easier to leave a trailing comma on the last item in the object or array. For example, code to output from an array of strings might look l..
I am trying to obtain a handle on one of the views in the Action Bar. I have tried calling: findViewById(R.id.menu_item) but this returns null unless I call it in the onOptionsItemSelected method. ..
I'm trying to port a shell script to the much more readable python version. The original shell script starts several processes (utilities, monitors, etc.) in the background with "&". How can I ach..
Let's say I have the following code:
Sub TestRangeLoop()
Dim rng As Range
Set rng = Range("A1:A6")
''//Insert code to loop through rng here
End Sub
I want to be able to iterate through..
How can i cast to a derived class? The below approaches all give the following error:
Cannot convert from BaseType to DerivedType. No constructor could take
the source type, or constructor overl..
In the book that I am reading on Python, it keeps using the code eval(input('blah'))
I read the documentation, and I understand it, but I still do not see how it changes the input() function.
What..
Okay, I know how to do it in C#.
It's as simple as:
Convert.ToBase64String(byte[])
and Convert.FromBase64String(string) to get byte[] back.
How can I do this in Java?..
when I tried to run my application its show the error below
Error running Dashboard: The activity must be exported or contain an intent-filter
How can I solve this error?..
Is there a way to amend a commit without vi (or your $EDITOR) popping up with the option to modify your commit message, but simply reusing the previous message?..
The upcase method capitalizes the entire string, but I need to capitalize only the first letter.
Also, I need to support several popular languages, like German and Russian.
How do I do it?..
I'm trying to create a UIImage View programmatically, I have a new view and I tried doing this
let imageName = "yourImage.png"
yourview.backgroundColor = UIColor.colorWithPatternImage(UIImage(named:i..
We have been opening a sharing popup (via window.open) with the URL like
https://www.facebook.com/sharer/sharer.php?s=100&p[title]=EXAMPLE&p[summary]=EXAMPLE&p[url]=EXAMPLE&p[images][..
I want to use a full-height app using flexbox. I found what I want using old flexbox layout module (display: box; and other things) in this link: CSS3 Flexbox full-height app and overflow
This is a c..
How do I find which Windows version I'm using?
I'm using PowerShell 2.0 and tried:
PS C:\> ver
The term 'ver' is not recognized as the name of a cmdlet, function, script file, or operable program..
I'm just beginning to dive into VBA and I've hit a bit of a roadblock.
I have a sheet with 50+ columns, 900+ rows of data. I need to reformat about 10 of those columns and stick them in a new workboo..
I have a multiple select:
<select name='strings' id="strings" multiple style="width:100px;">
<option value="Test">Test</option>
<option value="Prof">Prof</option>..
I'm just wondering how to get all key values in localStorage.
I have tried to retrieve the values with a simple JavaScript loop
for (var i=1; i <= localStorage.length; i++) {
alert(localSto..
I know how to retrieve a normal machine wide environment variable in CMAKE using
$ENV{EnvironmentVariableName}
but I can not retrieve a user specific environment variable. Is it possible and how?..
I am trying to decode a JSON string into an array but i get the following error.
Fatal error: Cannot use object of type
stdClass as array in
C:\wamp\www\temp\asklaila.php on line
6
Here is..
I am making Remote Desktop sharing application in which I capture an image of the Desktop and Compress it and Send it to the receiver. To compress the image I need to convert it to a byte[].
Currentl..
How can I check if a list is empty? If so, the system has to give a message saying List is empty. If not, the system has to give a message saying List is not empty.
Users can enter numbers, -1 to stop..
I have a project in which I'd like to use some of the .NET 4.0 features but a core requirement is that I can use the System.Data.SQLite framework which is compiled against 2.X. I see mention of this b..
I need to know if there is any method in iOS which behaves like Toast messages in Android. That is, I need to display a message which is dismissed automatically after few seconds. This is similar to ..
I have a form input with an id of 'date_trans'. The format for that date input (which is validated server side) can be any of:
dd/mm/yyyy
dd-mm-yyyy
yyyy-mm-dd
yyyy/mm/dd
However, before posting t..
I have a python script that'll be checking a queue and performing an action on each item:
# checkqueue.py
while True:
check_queue()
do_something()
How do I write a bash script that will check i..
What would be a more simplified description of file descriptors compared to Wikipedia's? Why are they required? Say, take shell processes as an example and how does it apply for it?
Does a process ta..
Angular 6 has new CLI command ng add <package>.
How can I remove the package using Angular CLI?
UPDATE
documentation
ng add will use your package manager to download new dependencies and ..
What is the simplest C# function to parse a JSON string into a object and display it (C# XAML WPF)? (for example object with 2 arrays - arrA and arrB) ..
I am sending file from client to server using TCP. To mark the end of the file I like to send file size before the actual data. So I use stat system call to find the size of the file. This is of type ..
Looking at a job descriptions where "advanced SQL" is a requirement. I can write basic queries as well as anyone, and have worked with MySQL databases in a professional setting, but what would I be g..
I was using a NSMutableArray and realized that using a dictionary is a lot simpler for what I am trying to achieve.
I want to save a key as a NSString and a value as an int in the dictionary. How is ..
The error says:
AttributeError: 'list' object has no attribute 'cost'
I am trying to get a simple profit calculation to work using the following class to handle a dictionary of bicycles:
class Bi..
I have a WinForms app that I am trying to make full screen (somewhat like what VS does in full screen mode).
Currently I am setting FormBorderStyle to None and WindowState to Maximized which gives me..
I often use JPEG images, and I have noticed that there are two very similar file extensions: .jpg, which my mobile's camera and the Preview application use, and .jpeg, with which Image Capture saves t..
I'm trying to use std::min_element and std::max_element to return the min and max elements in a vector of doubles. My compiler doesn't like how I'm currently trying to use them, and I don't understan..
I have this css code here
.navigation{
width:100%;
background-color:#7a7a7a;
font-size:18px;
}
.navigation ul {
list-style-type: none;
margin: 0;
}
.navigation li {
float: l..
Edit: based on a Ulf Rompe's comment, it is important you use "1" instead of "0", otherwise you will break sys.path.
I have been doing python for quite a while now (over a year), and I am always conf..
This was asked of me in an interview and this is the solution I provided:
public static int[] merge(int[] a, int[] b) {
int[] answer = new int[a.length + b.length];
int i = 0, j = 0, k = 0;
..
I have many "can't encode" and "can't decode" problems with Python when I run my applications from the console. But in the Eclipse PyDev IDE, the default character encoding is set to UTF-8, and I'm fi..
I want to use Chart.js within my Angular project.
In previous Angular2 versions, I have been doing this well by using a 'chart.loader.ts' which has:
export const { Chart } = require('chart.js');
Th..
<li><a href="#">Animal and Plant Health Inspection Service Permits
Provides information on the various permits that the Animal and Plant Health Inspection Service issues as well as onl..
I want my website to have the ability to send an email without refreshing the page. So I want to use Javascript.
<form action="javascript:sendMail();" name="pmForm" id="pmForm" method="post">
E..
I have a table for storing coupons/discounts, and I want to use the coupon_code column as the primary key, which is a VARCHAR.
My rationale is that, each coupon will have a unique code, and the only ..
My image file path is public/img/logo.png and
my app.blade.php file path is resources/views/app.blade.php
Inside of my app.blade.php file I use {{HTML::image('/img/stuvi-logo.png')}}
to display an im..
I have a table with a DateTime column
the column can have NULL values
Now I connect to the database using an ODBC connection and get the value into a DataTable in .net / c#.
I am able to check it fo..
Problem
I would like to know how to get the distance and bearing between 2 GPS points.
I have researched on the haversine formula.
Someone told me that I could also find the bearing using the same da..
The code below comes from jQuery UI Autocomplete:
var projects = [
{
value: "jquery",
label: "jQuery",
desc: "the write less, do more, JavaScript library",
icon: "..
I am fairly new to coding in general and really new to Xcode (Swift). I understand that I need to register a nib or a class but I don't understand 'where or how?'.
import UIKit
class NotesListViewCo..
I have an array of objects. I would like to map this array of objects. I know how to map an array, but can't figure out how to map an array of objects. Here is what I have done so far :
The array ..
If you are using ASP.NET MVC how are you doing grid display?
Rolled your own?
Got a library from somewhere?
These are some of the known grid display solutions I have found for ASP.NET MVC
ASP.NET M..
Microsoft.Office.Interop.Excel.WorkbookClass.SaveAs() method is working fine on Windows server 2003 and also on XP but not on Windows server 2008. I copied it as it is gave all Dll's and permissions
..
I am trying to encode some information to read into a Machine Learning model using the following
import numpy as np
import pandas as pd
import matplotlib.pyplot as py
Dataset = pd.read_csv('filenam..
What is the difference between an INNER JOIN and LEFT SEMI JOIN?
In the scenario below, why am I getting two different results?
The INNER JOIN result set is a lot larger. Can someone explain? I am..
I'm trying to get image from gallery.
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Selec..
I just want to get the files from the current dir and only output .mp4 .mp3 .exe files nothing else.
So I thought I could just do this:
ls | grep \.mp4$ | grep \.mp3$ | grep \.exe$
But no, as the f..
How do you format the date time to just date?
For example, this is what I retrieved from the database: 12/31/2008 12:00:00 AM, but I just want to show the date and no time...
How do I convert a byte array into a string?
I have found these functions that do the reverse:
function string2Bin(s) {
var b = new Array();
var last = s.length;
for (var i = 0; i < ..
I am confused by a program mentioned in K&R that uses getchar(). It gives the same output as the input string:
#include <stdio.h>
main(){
int c;
c = getchar();
while(c != EOF){..
I'm trying to make a dotted line. I'm using this right now for a solid line:
LinearLayout divider = new LinearLayout( this );
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( LinearL..
I'm attempting to connect to a SQL Server 2005 DB from my Mac using unixODBC and FreeTDS as I have outlined here. However, when I try to connect in to a different DB using the same setup, I get:
Conn..
I'm developing/testing a package in my local directory. I want to import it in the interpreter (v2.5), but sys.path does not include the current directory. Right now I type in sys.path.insert(0,'.'). ..
I'm trying to throw an exception in my code like this:
throw RuntimeException(msg);
But when I build in NetBeans I get this error:
C:\....java:50: cannot find symbol
symbol : method RuntimeExcept..
I have a series of data to enter into database. The user interface to enter the data isn't good for bulk entry, so I'm trying to formulate a command line equivalent. When I examine the network reque..
Really thought I had this issue fixed, but it was only disguised before.
I have a WCF service hosted in IIS 7 using HTTPS. When I browse to this site in Internet Explorer, it works like a charm, thi..
Does anyone know of a simple way to pretty-print JSON output in Go?
The stock http://golang.org/pkg/encoding/json/ package does not seem to include functionality for this (EDIT: it does, see accepted..
I was looking for some stylish fonts for my android application. but the problem is how can i make my android application supportable for external fonts.
Thank you...
i got the following:
<a href="{{ path('_be_activatecategory', {'id': category.id, 'active': 1}) }}">Aktivieren</a>
creates
/backend/categories/activate/8/1
and then i got
<a h..
Possible Duplicate:
How to decode HTML entities using jQuery?
I want to convert this text:
"<p>name</p><p><span style="font-size:xx-small;"..
I have a file in .gz format. The java class for reading this file is GZIPInputStream.
However, this class doesn't extend the BufferedReader class of java. As a result, I am not able to read the file ..
How do I install g++ for Fedora Linux? I have been searching the dnf command to install g++ but didn't find anything.
How do I install it?
I have already installed gcc..
I'm using Moment.js to parse and format dates in my web app. As part of a JSON object, my backend server sends dates as a number of milliseconds from the UTC epoch (Unix offset).
Parsing dates in a s..
I have a SQL Server 2008 database and I am working on it in the backend. I am working on asp.net/C#
SqlDataReader rdr = cmd.ExecuteReader();
while (rdr.Read())
{
//how do I read ..
I am trying all the ways of creating react application. I have tried with maven and now i am trying with crate-react-app build system from Facebook Incubators.
When i tried to run the command create-..
As I understand it, you're supposed to use the Environment.GetFolderPath method so you have OS independent code...
Windows XP uses C:\Documents and Settings\. Windows Vista uses C:\ProgramData and C:..
What is the best way(s) to fake function overloading in Javascript?
I know it is not possible to overload functions in Javascript as in other languages.
If I needed a function with two uses foo(x) ..
Possible Duplicate:
Why can't I return a double from two ints being divided
My C++ program is truncating the output of my integer devision even when I try and place the output into a fl..
I upgraded Xcode version and when using external static libraries, I get this message:
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /file/location for architecture armv..
I have the following dropdown
<label class="dropdown-toggle" role="button" data-toggle="dropdown" data-target="#">
Action <b class="caret"></b></label>
<ul class="dropd..
With a downloaded and installed version of Visual Studio Code 1.2.1, and a 64bit version of node.exe msi placed in my working directory (I am assuming that is correct), how do we add node and npm comm..
I know a few ways how to check this.
regex,int.parse,tryparse,looping.
can anyone tell me what is the fastest way to check?
the need is to only CHECK no need to actually parse.
this is not the same..
I have a main database and a report database, and I need to sync a table from main into report.
However, when an item gets deleted in the main database, I only want to set an IsDeleted flag in the re..
I am displaying some data in a ScrollView. On activity startup (method onCreate) I fill the ScrollView with data and want to scroll to the bottom.
I tried to use getScrollView().fullScroll(ScrollView..
I'm trying to move from Gulp to Webpack. In Gulp I have task which copies all files and folders from /static/ folder to /build/ folder. How to do the same with Webpack? Do I need some plugin?..
Is it possible to change current directory from a script?
I want to create a utility for directory navigation in Bash. I have created a test script that looks like the following:
#!/bin/bash
cd /hom..
I am trying to execute a curl command within a python script.
If I do it in the terminal, it looks like this:
curl -X POST -d '{"nw_src": "10.0.0.1/32", "nw_dst": "10.0.0.2/32", "nw_proto": "ICMP",..
I am not able to clone or push to a git repository at Bitbucket in Eclipse:
It's weird, because a day before I didn't have any problem. I have downloaded the sts 3 times with no luck. This error ke..
I am running my own http server on a raspberry pi. The problem is when I stop the program and restart it, the port is no longer available. Sometimes I get the same issue when receiving lots of request..
I know that this kind of question was asked before and I've checked all the answers and I have tried several times to find a solution but in vain.
In fact I call a Dataframe using Pandas. I've upload..
I have been re-factoring one of my old MSSQL Connection helper library and I got the following error:
Severity Code Description Project File Line Error CS7036 There is no
argument given..
I get an warning about [Accessibility]Missing contentDescription attribute on image in eclipse. This warning show at line 5 (declare ImageView) in XML code below.
This not make any error when build a..
I'm trying to get data from an array and using map function to render content. Look at
**{this.lapsList()}**
and the associated
**lapsList()**
function to understand what I'm trying to do. T..
I'm having a problem in Chrome with the following:
var items = $("option", obj);
items.each(function(){
$(this).click(function(){
// alert("test");
process($(this).html());
..
I have an Activity in which I go through several fragments. In every fragment I have several views (EditText, ListView, Map, etc).
How can I save the instance of the fragment that is shown at that mo..
I'm trying to handle a bunch of files, and I need to alter then to remove extraneous information in the filenames; notably, I'm trying to remove text inside parentheses. For example:
filename = "Exam..
I can express my need with the following scenario: Write a function that accepts a string to be run as a native command.
It's not too far fetched of an idea: if you're interfacing with other command..
When I'm adding a div to body, it's returning the body as the object and then whenever I use that - it's obviously using body. Bad.
Code:-
var holdyDiv = $('body').append('div');
$(holdyDiv).attr('i..
Occasionally I have a need to retry an operation several times before giving up. My code is like:
int retries = 3;
while(true) {
try {
DoSomething();
break; // success!
} catch {
if(..
Is there any environment variable available for getting the Jenkins Pipeline Title?
I know we can use $JOB_NAME to get title for a freestyle job,
but is there anything that can be used for getting P..
We use Spring Boot/MVC with annotation-based java-config for series of RESTful services and we want to selectively enable HTTP GZIP stream compression on some API responses.
I know I can do this manua..
I installed the supposedly free VS Community 2017 on my PC and 30 days later I get this message from VS saying that my license has expired.
License? Expired? I thought the community edition was "free..
I have a simple html page with angular js as follows:
//Application name
var app = angular.module("myTmoApppdl", []);
app.controller("myCtrl", function ($scope) {
//Sample login ..
Our Mysql queries use temporary tables which creates temporary files in the process. Currently the files are written to /tmp. How exactly can the path of the temp folder to which mysql writes to be ch..
My problem is quite classic. I have a private part of an application which is behind a login form. When the login is successful, it goes to a child route for the admin application.
My problem is that..
Sorry if this is too basic. I have a csv file where the columns have a header row (v1, v2, etc.). I understand that to extract columns 1 and 2, I have to do: awk -F "," '{print $1 "," $2}' infile.csv..
I'm trying to fit a Gaussian for my data (which is already a rough gaussian). I've already taken the advice of those here and tried curve_fit and leastsq but I think that I'm missing something more fu..
I use combobox in c# windows form. I bound the item list as below:
var employmentStatus = new BindingList<KeyValuePair<string, string>>();
employmentStatus.Add(new KeyValuePair<string..
I am using a form to "Rate" a page. This form "posts" data to a php script elsewhere. I simply want to display a link after the form is processed which will bring the user back to previous page. Can I..
Please have a look at the followng header file
#pragma once
class MissileLauncher
{
public:
MissileLauncher(void);
private:
byte abc[3];
};
This generated the error
Error 1 error C21..
Possible Duplicate:
PHP: “Notice: Undefined variable” and “Notice: Undefined index”
I am trying to do a registration form that registers a user in a database (MySQL).
The code is ..
I've encoded an Array I've made using the inbuilt json_encode(); function. I need it in the format of an Array of Arrays like so:
[["Afghanistan",32,12],["Albania",32,12]]
However, it is returning ..
Here's my situation:
on this.handleFormSubmit() I am executing this.setState()
inside this.handleFormSubmit(), I am calling this.findRoutes(); - which depends on the successful completion of this.se..
I'm writing a script in UNIX where I have to check whether the first character in a string is "/" and if it is, branch.
For example I have a string:
/some/directory/file
I want this to return 1, a..
For example when passing a value message to an NSInteger instance like so
[a value] it causes an EXC_BAD_ACCESS.
So how to convert an NSInteger to int?
If it's relevant only small numbers < 32 a..
For example, I get a string:
str = "please answer my question"
I want to write it to a file.
But I need to know the size of the string before writing the string to the file. What function can I us..
I have a String that represents an integer value and would like to convert it to an int. Is there a groovy equivalent of Java's Integer.parseInt(String)?..
Is it true that SQL Server 2000, you can not insert into a table variable using exec?
I tried this script and got an error message EXECUTE cannot be used as a source when inserting into a table varia..
I can't get tomcat7 to compile jsps. It till run the example servlets just fine and the service is up and running. I am running oracle java 8.
Can anyone point me in the right direction?
Here is the..
I am trying to loop through the following json array:
{
"id": "1",
"msg": "hi",
"tid": "2013-05-05 23:35",
"fromWho": "[email protected]"
}, {
"id": "2",
"msg": "there",
"tid": "2013-05-0..
I tried working with Apiary and made a universal template to send JSON to mock server and have this code:
package main
import (
"encoding/json"
"fmt"
"github.com/jmcvetta/napping"
"l..
What are people's experiences with any of the Git modules for Python? (I know of GitPython, PyGit, and Dulwich - feel free to mention others if you know of them.)
I am writing a program which will h..
I would like to be able to do something like:
AOEU=$(echo aoeu)
and have Jenkins set AOEU=aoeu.
The Environment Variables section in Jenkins doesn't do that. Instead, it sets AOEU='$(echo aoeu)'.
..
I want to do something like this:
private User PopulateUsersList(DataRow row)
{
Users user = new Users();
user.Id = int.Parse(row["US_ID"].ToString());
..
I have a struct:
typedef struct user {
string username;
vector<unsigned char> userpassword;
} user_t;
I need to initialize userpassword with an empty vector:
struct user r={"",?};
..
What's the difference between RANK() and DENSE_RANK() functions? How to find out nth salary in the following emptbl table?
DEPTNO EMPNAME SAL
------------------------------
10 rrr 10000...
What is the assembler syntax to determine which of two numbers is greater?
What is the lower level (machine code) for it? Can we go even lower? Once we get to the bit level, what happens? How is it r..
I have my HTML, CSS set up as per the code below. I have also added a JSFiddle link since it will be far more convenient to see the code in action.
The problem I'm having is that when there is a lot ..
I want to valid if user has entered username and password at the time of creating an account is safe or not based on its length(for my case five) on the right side of input field by showing that in d..
I am using this CSS for background opacity of a <div>:
background: rgba(255, 255, 255, 0.3);
It’s working fine in Firefox, but not in IE 8. How do I make it work?..
I have the following code that has worked for about a year:
import urllib2
req = urllib2.Request('https://somewhere.com','<Request></Request>')
data = urllib2.urlopen(req)
print data.rea..
I am building a webpage where I want the background image to scale to fit the whole screen, maintain aspect ratio and be fixed (so if you scroll down, the background image stays in the same place).
I..
I'm making a simple remove link with an onClick event that brings up a confirm dialog. I want to confirm that the user wants to delete an entry. However, it seems that when Cancel is clicked in the di..
I just want to clarify one thing. This is not a question on which one is better, that part I leave to someone else to discuss. I don't care about it.
I've been asked this question on my job interview ..
I've tried to display UTF-8 in the win7 cmd. Currently, I'm using the standard font because as I see with the mysql.exe, it works fine with the characters I'm working with (currently the german umlaut..
I am using Flot to graph some of my data and I was thinking it would be great to make this graph appear fullscreen (occupy full space on the monitor) upon clicking on a button. Currently, my div is as..
I configure lombok in eclipse Luna with Maven. Annotation is added properly, but no getter and setter are generated.
eclipse.ini
`-vm E:\Program Files\Java\jdk1.7.0_60\bin`
`-vmargs`
`-Dosgi.require..
Since TCP guarantees packet delivery and thus can be considered "reliable", whereas UDP doesn't guarantee anything and packets can be lost. What would be the advantage of transmitting data using UDP i..
The code below is in C# and I'm using Visual Studio 2010.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
namespace FrontEnd
{
class ..
I'm trying to loop through this to get the 'name' values. This is what I currently have, but it doesn't seem to be working, tried a few others from what was posted here but nothing seemed to work.
..
I've seen this done in other webapps, but I'm fairly new to Javascript and can't really figure this out on my own. I want to create a Google Hangout programmatically. However, in the official API the ..
How would I select elements that have any ID? For example:
if ($(".parent a").hasId()) {
/* then do something here */
}
I, by no means, am a master at jQuery...
How can i perform an LIKE query within Linq?
I have the following query i would like to execute.
var results = from c in db.costumers
where c.FullName LIKE "%"+FirstName+"%,"+LastName
..
I have a String and I want to extract the (only) sequence of digits in the string.
Example:
helloThisIsA1234Sample.
I want the 1234
It's a given that the sequence of digits will occur only once wit..
Possible Duplicates:
What is the difference between the dot (.) operator and -> in C++?
What is the arrow operator (->) synonym for in C++?
The header says it all.
What does -> me..
I have a div like this <div class="xyz"></div> and all the content in that div is in the css. How do I make that div into a link? I tried wrapping the a tag around it, but that didn't see..
Let's suppose if we have a class like:
class Person {
internal int PersonID;
internal string car;
}
I have a list of this class: List<Person> persons;
And this list can have multi..
I have an HTML textarea that is of fixed width, but variable height. I would like to set overflow:scroll and be able to show a vertical scrollbar, but not a horizontal one. I am not able to use overfl..
I'm trying to make one of my containers 100% of the width of the screen.
Here is my SASS
body, html {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
}
#neo_wrapper {
width..
You've seen iterations of this type of progress bar on sites like paypal. How does one go about setting this up using CSS and jquery? I have 4 pages and each page is a step... so 4 steps...
I don't understand why I can't insert this. I can't spot the problem. The error message is
Conversion failed when converting from a character string to uniqueidentifier.
The GUIDs are the ones that I..
I am using following code for handling row clicks. (source)
static class RecyclerTouchListener implements RecyclerView.OnItemTouchListener {
private GestureDetector gestureDetector;
private ..
I get the following error when trying to connect to SQL Server:
Cannot connect to 108.163.224.173.
A network-related or
instance-specific error occurred while establishing a connection to
SQL Server...
I have a KendoGrid like below and when I run the application, I'm not getting the expected format for date column.
$("#empGrid").kendoGrid({
dataSource: {
data: empModel.Value,
pa..
I have the following request handler for saving autos. I have verified that this works when I use e.g. cURL. Now I want to unit test the method with Spring MVC Test. I have tried to use the fileUpload..
I am trying to design a page where there are some tables. It seems that styling tables is much more painful than it ought to be.
The problem is the following: The tables should have a fixed height an..
I have a class with a unique_ptr member.
class Foo {
private:
std::unique_ptr<Bar> bar;
...
};
The Bar is a third party class that has a create() function and a destroy() function.
I..
Is there a way for me to subset data based on column names starting with a particular string? I have some columns which are like ABC_1 ABC_2 ABC_3 and some like XYZ_1, XYZ_2,XYZ_3 let's say.
How can ..
[2014-04-16 14:01:05 - Abc] ------------------------------
[2014-04-16 14:01:05 - Abc] Android Launch!
[2014-04-16 14:01:05 - Abc] The connection to `ADB` is down, and a severe error has occurred.
[20..
I have the following use case: I would like to be able to push to [email protected]:gitolite-admin using the private key of user gitolite-admin, while I want to push to [email protected]:some_repo..
Does anyone know how to implement a sliding menu like some of the top apps of today?
Other Stack Overflow questions haven't had any answers on how to do this, so I'm trying to gather as much info to..
I've got two numbers stored in varibles, a and b, and i'd like to see of the ratio of those two is an integer or not in python. However when I try
result = a./b
it gives me a
SyntaxError: invali..
Is there a concise way to iterate over a stream whilst having access to the index in the stream?
String[] names = {"Sam","Pamela", "Dave", "Pascal", "Erik"};
List<String> nameList;
Stream<I..
I'm adding TextViews programmatically in a for-loop and add them to an ArrayList.
How do I use TextView.setId(int id)? What Integer ID do I come up with so it doesn't conflict with other IDs?..
I'm writing a function in PL/pgSQL, and I'm looking for the simplest way to check if a row exists.
Right now I'm SELECTing an integer into a boolean, which doesn't really work. I'm not experienced wit..
I get this error when I try to source a large SQL file (a big INSERT query).
mysql> source file.sql
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection..
What is the easiest way to convert from int to equivalent string in C++. I am aware of two methods. Is there any easier way?
(1)
int a = 10;
char *intStr = itoa(a);
string str = string(intStr);
(..
In a Python for loop that iterates over a list we can write:
for item in list:
print item
and it neatly goes through all the elements in the list. Is there a way to know within the loop how man..