This is the code I currently have:
public class FileStatus extends Status{
FileWriter writer;
public FileStatus(){
try {
writer = new FileWriter("status.txt",true);
} catch (IOExcepti..
I have a RESTful server which takes an http POST input from client to vote up songs on server. I have used Apache HTTPClient for client.
public boolean vote() {
HttpClient client = new Defaul..
I have this exception and I don't understand why it would be thrown or, how I should handle it.
try {
os.writeObject(element);
} catch (IOException e) {
e.printStackTrace();
}
Where elemen..
I'm new to Jetty, I tried to run the sample program here "http://www.codeproject.com/Articles/128145/Run-Jetty-Web-Server-Within-Your-Application"
but I got error message on my page "http://localhost..
When the application is started, none of the rows is selected. But I would like to show that the first row is already selected.
How to do this? Do I need to set the color of a row in JTable?
Updat..
I recently converted a website project to a web application project in Visual Studio 2008. I finally got it to compile, and the first page (the login screen) displayed as normal, but then when it red..
I understand that:
atan2(vector.y, vector.x) = the angle between the vector and the X axis.
But I wanted to know how to get the angle between two vectors using atan2. So I came across this solution:..
I'm new to both git and GitHub. I managed to set up everything locally on my Mac, so that now I can push commits to GitHub via git (on the command line, not the Mac app).
When I push commits directly..
I have the need to set a binding in code.
I can't seem to get it right tho.
This is what i have tried:
XAML:
<TextBox Name="txtText"></TextBox>
Code behind:
Binding myBinding = new ..
An Xcode beginner's question:
It is my first experience with Xcode 4.6.3.
I am trying to write a very simple console program, that searches for paired BT devices and prints them to an NSLog.
It bui..
What's the usage of the tilde operator in Python?
One thing I can think about is do something in both sides of a string or list, such as check if a string is palindromic or not:
def is_palindromic(s..
I'm trying to do something like the following in React JSX (where ObjectRow is a separate component):
<tbody>
for (var i=0; i < numrows; i++) {
<ObjectRow/>
}
</tbod..
Can anyone explain about the purpose of PRIMARY KEY, UNIQUE KEY and KEY, if it is put together in a single CREATE TABLE statement in MySQL?
CREATE TABLE IF NOT EXISTS `tmp` (
`id` int(11) NOT NULL ..
This question might be very basic
Is there a way to reduce the frame size/rate of Lossy compressed (WMV, MPEG) format, to get a smaller video, of lesser size, with same format.
Are there any open so..
In Java, I want to do something like this:
try {
...
} catch (/* code to catch IllegalArgumentException, SecurityException,
IllegalAccessException, and NoSuchFieldException at t..
There is a property, it's named ImageFullPath1
public string ImageFullPath1 {get; set; }
I'm going fire an event whenever its value changed. I am aware of changing INotifyPropertyChanged, but I wan..
I am a beginner in C++. I have come across override keyword used in the header file that I am working on. May I know, what is real use of override, perhaps with an example would be easy to understand...
I want to convert an integer to a string in Python. I am typecasting it in vain:
d = 15
d.str()
When I try to convert it to string, it's showing an error like int doesn't have any attribute called st..
How to remove null value from String array in java?
String[] firstArray = {"test1","","test2","test4",""};
I need the "firstArray" without null ( empty) values like this
String[] firstArray = {"te..
I have just created a very simple chrome extension and it works fine. But when I converted to .crx file and try to open it with chrome, nothing happens. my chrome browser version is 19.0.1081.2 dev-m...
We are building a new REST API.
I was arguing that error code 500 (Internal Server Error) should never be returned.
Now, of course if you know the client's params are wrong or something you have eve..
I have a PowerShell script to add a website to a Trusted Sites in Internet Explorer:
set-location "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings"
set-location ZoneMap\Domains
new-..
I have this function:
function make(place)
{
place.innerHTML = "somthing"
}
I used to do this with plain JavaScript and html:
<button onclick="make(this.parent)">click me</button>
..
I'm looking for the same effect as alert() in JavaScript.
I wrote a simple web-based interpreter this afternoon using Twisted.web. You basically submit a block of Python code through a form, and the ..
Looking to pass a list of User IDs to return a list names. I have a plan to handle the outputed names (with a COALESCE something or other) but trying to find the best way to pass in the list of user I..
I have a MySQL database, with a column that is date type DATETIME.
I am getting a string value for a date / time from an external application. That string value looks like this:
'5/15/2012 8:06:26..
I tried to do a lot of research but I'm more of a db guy - so even the explanation in the MSDN doesn't make any sense to me. Can anyone please explain, and provide some examples on what Include() stat..
I have a Qt project and I would like to output compilation files outside the source tree.
I currently have the following directory structure:
/
|_/build
|_/mylib
|_/include
|_/src
|_/resources..
In C, how can I copy a string with begin and end indices, so that the string will only be partially copied (from begin index to end index)?
This would be like 'C string copy' strcpy, but with a begi..
This is what I have right now:
$("#number").val(parseFloat($("#number").val()).toFixed(2));
It looks messy to me. I don't think I'm chaining the functions correctly. Do I have to call it for eac..
name = input('Enter name here:')
pyc = input('enter pyc :')
tpy = input('enter tpy:')
percent = (pyc / tpy) * 100;
print (percent)
input('press enter to quit')
whenever i run this program i get this..
User kokos answered the wonderful Hidden Features of C# question by mentioning the using keyword. Can you elaborate on that? What are the uses of using?..
I've got a problem.
I want to add the class "active" on item menu when the relative page is on.
the menu is very simple:
<div class="menu">
<ul>
<li><a href="~/link1/">LINK..
I can't run my Rspec user_spec.rb test due to a syntax error. Too many "end" perhaps in 2 different files? I've added and deleted 'end' in certain places without success.
Syntax error "syntax error,..
I have an array X of 10 elements. I would like to create a new array containing all the elements from X that begin at index 3 and ends in index 7. Sure I can easily write a loop that will do it for me..
I made an HTML page that has an <input> tag with type="text". When I click on it using Safari on iPhone, the page becomes larger (auto zoom). Does anybody know how to disable this?..
The web application that I am upgrading uses jQuery and jQuery UI. I have replaced most instances of window.open and <a target=_blank> with jQuery UI dialog. For example, the terms and condition..
Is there a way to, for example, print Hello World! every n seconds?
For example, the program would go through whatever code I had, then once it had been 5 seconds (with time.sleep()) it would execute ..
Could someone tell me how to get the parent directory of a path in Python in a cross platform way. E.g.
C:\Program Files ---> C:\
and
C:\ ---> C:\
If the directory doesn't have a parent di..
Out-File seems to force the BOM when using UTF-8:
$MyFile = Get-Content $MyPath
$MyFile | Out-File -Encoding "UTF8" $MyPath
How can I write a file in UTF-8 with no BOM using PowerShell?..
I have Windows 7, installed jdk1.7.0 and its supporting jre7.
My problem is compilation part works perfectly, but while running the Java program I get this error saying:
"Could not find or load ma..
I have an array of objects containing some information. I am not able to render them in the order I want and I need some help with that. I render them like this:
this.state.data.map(
(item,..
I have this structure:
WebContent
resources
components
top.xhtml
company
about_us.xhtml
index.xhtml
top.xhtml is a component, that is used in index.xthml a..
Suppose you have the following documents in my collection:
{
"_id":ObjectId("562e7c594c12942f08fe4192"),
"shapes":[
{
"shape":"square",
"color":"blue"
},
..
I am trying to install Xampp win32-1.8.2 on Windows 8.1. I get a message saying" Because an activated user account User Account on your system some functions of XAMPP are possibly restricted." I've tr..
i am new in CSS so sorry if this question is just stupid or too simple but i just dont know how to do it.
I need to place a button over the image, how it should looks:
You see there a blue button ..
I would like to use a select field with multiple as a common dropdown field with size=1:
<select name="test[]" size="1" multiple>
<option>123
<option>456
<option>7..
Using Python Pandas I am trying to find the Country & Place with the maximum value.
This returns the maximum value:
data.groupby(['Country','Place'])['Value'].max()
But how do I get the corr..
I use bundler to manage dependencies in my rails app, and I have a gem hosted in a git repository included as followed:
gem 'gem-name', :git => 'path/to/my/gem.git'
To update this gem, I execute..
I have a WebApi / MVC app for which I am developing an angular2 client (to replace MVC). I am having some troubles understanding how Angular saves a file.
The request is ok (works fine with MVC, and ..
How can I know if a certain port is open/closed on linux ubuntu, not a remote system, using python?
How can I list these open ports in python?
Netstat:
Is there a way to integrate netstat output w..
I am writing application using AngularJS and Spring. I would like to send request to the server and download response returned from controller as a file. In controller I have content of csv file (as s..
NOTE: This question is from 2014. As of Java 11 OpenJDK and Oracle
JDK are converging.
Are there any crucial differences between Oracle and OpenJDK?
For example, are the garbage collection a..
Python's http.server (or SimpleHTTPServer for Python 2) is a great way of serve the contents of the current directory from the command line:
python -m http.server
However, as far as web servers go, i..
I'm attempting something which I feel should be fairly obvious to me but it's not. I'm trying to match a string which does NOT contain a specific sequence of characters. I've tried using [^ab], [^(a..
I have a ListActivity with my customized adapter and inside each of the view, it may have some buttons, in which I need to implement OnClickListener. I need to implement the OnClickListener in the ada..
I'm trying to create a button with height of '22px' , and that the text inside the button will be vertically aligned in the center of the button. I tried everything , and can't find out how to do it.
..
I would like to sort and binary search a static array of strings via the String.CompareTo comparator.
The problem is that both sorting, and binary searching requires that a Comparator object be passe..
I'm trying to compare 2 strings alphabetically for sorting purposes. For example I want to have a boolean check like if('aaaa' < 'ab'). I tried it, but it's not giving me correct results, so I gues..
I have a pod test-1495806908-xn5jn with 2 containers. I'd like to restart one of them called container-test. Is it possible to restart a single container within a pod and how? If not, how do I restart..
I want to split each line of a pipe on spaces, and then print each token on its own line.
I realise that I can get this result using:
(cat someFileInsteadOfAPipe).split(" ")
But I want more flexib..
On several occations, I have faced the situation that the default.aspx page on a Site doesn't work. More specifically, a reference to a WebPart and/or Control is throwing a error because the assembly ..
How do I obtain a Certificate Signing Request? All I'm trying to do is get my app running on my ipod touch. This was easy as I could just go to the IOS development portal and just download one, no mus..
As the title implies, my question is how to get the size of a string in C. Is it good to use sizeof if I've declared it (the string) in a function without malloc in it? Or, if I've declared it as a po..
I thought I heard that py2exe was able to do this, but I never figured it out. Has anyone successfully done this? Can I see your setup.py file, and what command line options you used?
Basically I'm..
I;ve been trying to create a custom button in android using this tutorial - http://www.gersic.com/blog.php?id=56
It works well but it doesn't say how to change the font size or weighting. Any ideas?
..
How to create a temp table similarly to creating a normal table?
Example:
CREATE TABLE table_name
(
column1 datatype,
column2 datatype,
column3 datatype,
....
);
..
I'm having a similar issue to The current transaction cannot be committed and cannot support operations that write to the log file, but I have a follow-up question.
The answer there references Using ..
I have a pandas data frame df like:
a b
A 1
A 2
B 5
B 5
B 4
C 6
I want to group by the first column and get second column as lists in rows:
A [1,2]
B [5,5,4]
C [6]
Is it possible to do something..
Recently in an official .NET Framework Blog it was announced that .NET Core is going open source.
Ironically, the author mentions that what .NET Core is will be explained in the next post. Some more ..
I've seen div tags use a clearfix class when it's child divs use the float property. The clearfix class looks like this:
.clearfix:after {
clear: both;
content: ".";
display: block;
h..
I have a .php script that I use for creating the list of my products.
I am on shared hosting, so I can't do a lot of queries otherwise I get a blank page.
This is how I use my script now:
script.php..
I wanna write my own form validation javascript library and I've been looking on google how to detect if a submit button is clicked but all I found is code where you have to use onClick on onSubmit="f..
I want to use generic way to manage 5xx error codes, let's say specifically the case when the db is down across my whole spring application. I want a pretty error json instead of a stack trace.
For ..
Just wondering what the difference between BeginInvoke() and Invoke() are?
Mainly what each one would be used for.
EDIT: What is the difference between creating a threading object and calling invok..
I'm working with a few divs that are set to display: inline-block and have a set height and width. In the HTML, if there is a line break after each div there is an automatic 5px margin add to the righ..
I was looking for a way to add new elements to an an existing object like what push does with arrays
I have tried this and it didn't work :
var myFunction = {
Author: 'my name ',
date: '15-..
the following code fills the vector with 10 values in first for loop.in second for loop i want the elements of vector to be printed.
The output is till the cout statement before the j loop.Gives error..
I tried to run a project downloaded from github. Unfortunately, during npm install the following warnings were shown. I tried to change the version based on this question. However, I had a problem, be..
I have one class with a method like this:
public ArrayList<Integer> myNumbers() {
ArrayList<Integer> numbers = new ArrayList<Integer>();
numbers.add(5);
numbers.add(1..
Say I have a javascript object that looks like this :
var data = {
name: "cliff",
age: "34",
name: "ted",
age: "42",
name: "bob",
age: "12"
}
var jsonData =..
How safe is it to use UUID to uniquely identify something (I'm using it for files uploaded to the server)? As I understand it, it is based off random numbers. However, it seems to me that given enough..
I am using XAMPP. and internal server of Django.
When I browse to localhost or 127.0.0.1, It shows
Not Found . HTTP Error 404. The requested resource is not found.
It sometimes works fine and other ..
Currently, my app has a controller that takes in a JSON file then iterates through them using "ng-repeat". This is all working great, but I also have a directive that needs to iterate through the same..
Consider the following piece of LaTeX code:
\begin{tabular}{p{1in}p{1in}}
A & B\\
C & D\\
\end{tabular}
How can I make the contents of each cell aligned in the center of the cell rather t..
I want to display some text inside SVG rect. Is it possible?
I tried
<svg xmlns="http://www.w3.org/2000/svg">
<g>
<rect x="0" y="0" width="100" height="100" fill="red">
..
How can I get the file name from request.FILES in Django?
def upload(request):
if request.method == 'POST':
form = UploadForm(request.POST, request.FILES)
if form.is_valid():
..
I wonder why most modern solutions built using Perl don't enable UTF-8 by default.
I understand there are many legacy problems for core Perl scripts, where it may break things. But, from my point of ..
I have a table called person in my database. I want to add another column to the same table and it's a Boolean datatype column. I have tried following queries but it says syntax error near default. I ..
I'm using HTML5 for validating fields. I'm submitting the form using JavaScript on a button click. But the HTML5 validation doesn't work. It works only when then input type is submit. Can we do anythi..
I am creating a popupwindow and I want to add a css file to that popupwindow below is the code for popupwindow. I have a javascript with creates a popupwindow.
<a href="popupwindowcontent.xhtml" ..
I know in Ruby that I can use respond_to? to check if an object has a certain method.
But, given the class, how can I check if the instance has a certain method?
i.e, something like
Foo.new.respond..
I am trying to create an html5 web page in which there is a small video like 13s , I converted the flash version of this video into 3 format : .ogv using fireFogg , .webm using firefogg also and .mp4 ..
I've generated key pairs using PuTTYgen and been logging in using Pageant, so that I have to enter my pass-phrase only once when my system boots.
How do I achieve this in Linux? I've heard of keycha..
In my activity, I create a Bitmap object and then I need to launch another Activity,
How can I pass this Bitmap object from the sub-activity (the one which is going to be launched)?..
I have a small problem with list. So i have a list called l:
l = ['Facebook;Google+;MySpace', 'Apple;Android']
And as you can see I have only 2 strings in my list. I want to separate my list l by '..
I have a list of numbers as below:
0, 16, 32, 48 ...
I need to output those numbers in hexadecimal as:
0000,0010,0020,0030,0040 ...
I have tried solution such as:
printf("%.4x",a); // whe..
I have an enum
string name;
public enum Color
{
Red,
Green,
Yellow
}
How to set it to NULL on load.
name = "";
Color color = null; //error
Edited:
My bad, I didn't explain it properly. B..
Is there any method in Java or any open source library for escaping (not quoting) a special character (meta-character), in order to use it as a regular expression?
This would be very handy in dynamic..
What sorts of methods exist for prematurely exiting an if clause?
There are times when I'm writing code and want to put a break statement inside of an if clause, only to remember that those can only..
I'm trying to create a stored procedure. Here's what I have so far (not working):
DELIMITER |
CREATE PROCEDURE getNearestCities(IN cityID INT)
BEGIN
DECLARE cityLat FLOAT;
DECLARE..
I am using WordPress. I have an image folder like mytheme/images/myimages.
I want to retrieve all the images name from the folder myimages
Please advice me, how can I get images name...
I have run gitlabhq rails server on virtual machine, following 1-6 steps from this tutorial https://github.com/gitlabhq/gitlab-recipes/blob/master/install/centos/README.md and starts rails server exec..
I need to be able to do is replace a space () with a dot (.) in a string in bash.
I think this would be pretty simple, but I'm new so I can't figure out how to modify a similar example for this use...
Sorry for asking the already answered question, I am a newbie to C and don't understand the solutions.
Here is my function
int rotateArr(int *arr) {
int D[4][4];
int i = 0, n =0;
for(i; i..
I'm using the PostgreSql app for mac (http://postgresapp.com/). I've used it in the past on other machines but it's giving me some trouble when installing on my macbook. I've installed the application..
I'm developing a website in Angular 2 using Typescript and I was wondering if there was a way to implement thread.sleep(ms) functionality.
My use case is to redirect the users after submitting a form..
I am receiving this error in Python 3.5.1.
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Here is my code:
import json
import urllib.request
connection = urllib.reques..
My understanding of x86 registers say that each register can be accessed by the entire 32 bit code and it is broken into multiple accessible registers.
In this example EAX being a 32 bit register, if..
I'm still learning web API, so pardon me if my question sounds stupid.
I have this in my StudentController:
public HttpResponseMessage PostStudent([FromBody]Models.Student student)
{
if (DBManag..
I would like to get the current element (whatever element that is) in an HTML document that I clicked. I am using:
$(document).click(function () {
alert($(this).text());
});
But very strangely, I..
i have a html string containing this:
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv="content-type" content=..
Is it possible to use the report designer in the current release of Visual Studio 2017?
The SAP crystal report wiki for visual studio integration only states: "RC build currently not supported - ..
I'm using Bootstrap Carousel. All I want is that the slider will only slide when a navigation or a pagination is clicked.
I've tried removing
$('.carousel').carousel({
interval: 6000
});
It..
Actually I'm a bit confused. Although I read several resources about this.
For having a test of Selenium 3 using ChromeBrowser we need an extra app called ChromeDriver.
I found this text from GitHub..
My current code:
RestTemplate restTemplate = new RestTemplate();
restTemplate.getMessageConverters().add(new MappingJackson2HttpMessageConverter());
Mall[] malls = restTemplate.getForObject(url, Mall..
I'm trying to create a maven project - so that I can compile Java files in the root folder and output the class files in another folder.
I've already downloaded mvn.
I'm trying to integrate with VS ..
I am receiving this error "Warning: Illegal string offset 'type' in /home/mysite/public_html/wp-content/themes/evento/lib/php/extra.class.php on line 32"
and I realized this section of code in the fi..
I'm trying to do something very simple. Basically I have a clickable div 'hot spot', when you click that it fills the screen and displays some content. I achieved this by simply changing the class of ..
I've got a large-ish class (40 or so methods) that is part of a package I will be submitting as course-work. Currently, the methods are pretty jumbled up in terms of utility public/private etc. and I ..
I have a text box with a displayed string already in it.
To bring the cursor to the textbox I am already doing
txtbox.Focus();
But how do I get the cursor at the end of the string in the textbox ?..
I have a string array and one string. I'd like to test this string against the array values and apply a condition the result - if the array contains the string do "A", else do "B".
How can I do that?..
I have a data frame called followers_df as below:
followers_df
0
0 oasikhia
0 LEANEnergyUS
0 _johannesngwako
0 jamesbreenre
0 CaitlinFecteau
0 mantequillaFACE
0 ..
Can anyone explain or suggest a tutorial to dynamically create a ListView in android?
Here are my requirements:
I should be able to dynamically add new elements by pressing a button.
Should be simple..
I have 3 TextBoxes (Id1,Name and Salary). Id and Salary should contain integers and Name should only contain characters. I need validations for my TextBox, it should show errors as I enter wrong chara..
I would like to implement a JavaScript code which states this:
if the page is loaded completely, refresh the page immediately, but only once.
I'm stuck at the "only once":
window.onload = function ()..
I was wondering if it is possible to perform a certain number of operations without storing the loop iteration number anywhere.
For instance, let's say I want to print two "hello" messages to the con..
I have a TextEditingController where if a user clicks a button it fills in with information. I can't seem to figure out how to change the text inside of a Textfield or TextFormField. Is there a soluti..
I'm doing some basic sql on a few tables I have, using a union(rightly or wrongly)
but I need remove the duplicates. Any ideas?
select * from calls
left join users a on calls.assigned_to= a.user_id
..
I have a Node.js project that requires Node version 12 or higher. Is there a way to specify this in the packages.json file, so that the installer will automatically check and inform the users if they ..
I'm trying to install Pillow (Python module) using pip, but it throws this error:
ValueError: jpeg is required unless explicitly disabled using --disable-jpeg, aborting
So as the error says, I trie..
I am Trying to Transpose a range of cells in Excel through VBA macro but I am getting some errors, mostly Error 91.
I am pretty new to VBA and don't have much idea about functions either.
Range(InR..
I have 2 textboxes on my site for pickup date and drop off date both using the jquery date picker.
I am having trouble setting the drop off date value to be one day ahead of the pickup date that was ..
I cannot find a way to comment and uncomment multiple lines of code in Visual Studio Code.
Is it possible to comment and uncomment multiple lines in Visual Studio Code using some shortcut? If yes, ho..
Im passing data to my blade view with return View::make('blog', $posts); and in my blade view I'm trying to run an @foreach ($posts as $post) I end up with an error saying that $posts isn't defined.
..
I am having a problem where the page is loading so fast, that jquery hasn't finished loading before it is being called by a subsequent script. Is there a way to check for the existence of jquery and ..
Based on extra vars parameter I Need to write variable value in ansible playbook
ansible-playbook playbook.yml -e "param1=value1 param2=value2 param3=value3"
If only param1 passed
myvariable: 'par..
Searching the net this seems to be a problem caused by spaces in the Python installation path.
How do I get pip to work without having to reinstall everything in a path without spaces ?..
I want to convert below XML to PHP array. Any suggestions on how I can do this?
<aaaa Version="1.0">
<bbb>
<cccc>
<dddd Id="id:pass" />
<eeee name="he..
What is the most modern (best) way of satisfying the following in C#?
string encryptedString = SomeStaticClass.Encrypt(sourceString);
string decryptedString = SomeStaticClass.Decrypt(encryptedString..
I want to be able to log FFMPEG processes because I am trying to work out how long a minute of video takes to convert to help with capacity planning of my video encoding server. How do I enable loggin..
I have installed Jupyter Notebook on ubuntu 16.04 using pip3. I can execute jupyter notebook command. It opens and shows a list of current path directories.
But I cannot create a new notebook(Python3..
I have a problem with Android Studio 0.2.3.
When I run my project the build stops and appears message that says:
Gradle: Execution failed for task ':AppName:compileDebugAidl'.
> failed to find ..
I'm struggling to understand how to pass data between components in vue.js. I have read through the docs several times and looked at many vue related questions and tutorials, but I'm still not getti..
I've installed EGit plugin at Eclipse Helios and I'm trying to use it with my GitHub account, but when I try to configure it I get an "Auth Failed" error.
I'd been googling it but no luck... it seems..
I want users on the site to be able to download files whose paths are obscured so they cannot be directly downloaded.
For instance, I'd like the URL to be something like this: http://example.com/down..
I have excel file with such contents:
A1: SomeString
A2: 2
All fields are set to String format.
When I read the file in java using POI, it tells that A2 is in numeric cell format.
The problem is..
In Bootstrap v3 I often use the hidden-** classes combined with clearfix to control multi column layouts at different screen widths. For example,
I could combine multiple hidden-** in one DIV to mak..
Is there a way to randomly change marker-colors in native Leaflet? I'm using svg elements which could be styled.
I know that it is possible with mapbox.js
EDIT:
To clarify what I intend to do: If you ..
I have some URLs, like
http://www.example.com/something?param1=value1¶m2=value2¶m3=value3
and I would like to extract the parameters from these URLs and get them in a Hash. Obviousl..
Is there a way to replace all occurrences of a substring with another string in std::string?
For instance:
void SomeFunction(std::string& str)
{
str = str.replace("hello", "world"); //< I'..
I've got a couple of hyperlinks that each have an ID attached. When I click on this link, I want to open a modal ( http://twitter.github.com/bootstrap/javascript.html#modals ), and pass this ID to the..
I have some code that makes a call to a third party web service that is secured using X.509 certification.
If I call the code directly (using a unit test) it works without any problems.
When deploye..
I have to concatenate these two strings from my resource/value files:
<string name="Toast_Memory_GameWon_part1">you found ALL PAIRS ! on </string>
<string name="Toast_Memory_GameWon_pa..
I have a SQL Server table and it is located on a remote server. I can connect to it with SQL Server Management Studio but opening it takes time instead, I am doing my jobs with SQL Query window withou..
After seeing Toggling button text in jquery this question, I tried to re create it in my situation but can't seem to have it work.
Here is a fiddle of what I've done: http://jsfiddle.net/V4u5X/
$('...
I come from a the Objective-C and Cocoa world where there are lots of conventions and many people will say it makes your code beautiful!
Now programming in C++ I cannot find a good document like this ..
I'm Trying to Link a static Library to a shared library , I'm Getting the Following error
/usr/bin/ld: ../../../libraries/log4cplus/liblog4cplus.a(fileappender.o): relocation R_X86_64_32S against `a ..
I've been looking around for this solution for a while but haven't got any.
e.g one solution is
self.navigationItem.setRightBarButtonItem(UIBarButtonItem(barButtonSystemItem: .Stop, target: self, ..
I am using windows XP. I am creating a table in phpMyAdmin using its built-in create table feature,
my database name is ddd.
It generates the following code:
CREATE TABLE `ddd`.`mwrevision` (
`as..
I did something like this to count the number of rows in an alias in PIG:
logs = LOAD 'log'
logs_w_one = foreach logs generate 1 as one;
logs_group = group logs_w_one all;
logs_count = foreach logs_g..
I just found out how to hide the scrollbar in Google Chrome, I did it with this code:
::-webkit-scrollbar { display: none; }
The only problem is that this doesn't work on Firefox. I tried many ways t..
I want to look at the source code for a function to see how it works. I know I can print a function by typing its name at the prompt:
> t
function (x)
UseMethod("t")
<bytecode: 0x2332948>
&..
I am using mysql and need to update a column with a null value. I have tried this many different ways and the best I have gotten is an empty string.
Is there a special syntax to do this?..
This question was asked here:
Remove empty strings from array while keeping record of indexes with non empty strings
If you'd notice the given as @Baz layed it out;
"I", "am", "", "still", "here", "..
Windows's Snipping tool can capture the screen, but sometimes I want to capture the screen after five seconds, such as taking an image being displayed by the webcam. (Run the script and smile at the c..
How do I change/replace the <h3> text: "Featured Offers" using javascript to say "Public Offers" instead?
</div> <!-- FEATURED OFFERS -->
<div class="panel">
<div class..
For example, I want to join a prefix path to resource paths like /js/foo.js.
I want the resulting path to be relative to the root of the server. In the above example if the prefix was "media" I woul..
I have an issue with IntelliJ. It doesn't show any folders in my project view on the left.
My setting is "View As: Project"
How can I manage it so that the folders and packages are shown again?
I don..
Is there a reason to prefer using map() over list comprehension or vice versa? Is either of them generally more efficient or considered generally more pythonic than the other?..
I want to convert current data into 'yyyy-MM-dd' format in .ts file. i template it can easily be done by using data pipe. how to do that in typescript.
In template:
{{date | date:'yyyy-MM-dd'}}
H..
I have this new warning about the Google Framework in my app:
(null): URGENT: all bitcode will be dropped because
'/Users/myname/Library/Mobile
Documents/com~apple~CloudDocs/foldername/appname..
I've created a bot in telegram
I want to send bold and italic text with HTML page to bot
My HTML code is:
<html>
<head><title>Telegram</title></head>
<body>
..
Here's the information I have:
I am working with a Linux based system using MySQL and PHP5. I need to be able to generate a mysqldump from within a .php file, and then have that dump be stored in a ..
Just implemented RecyclerView in my code, replacing ListView.
Everything works fine. The data is displayed.
But error messages are being logged:
15:25:53.476 E/RecyclerView: No adapter attached; sk..
Can I stretch text in CSS? I don't want the font to be bigger, because that makes it appear bolder than smaller text beside it. I just want to stretch the text vertically so it's kind of deformed. Th..
I'm trying to find a fast way to remove zero decimals from number values like this:
echo cleanNumber('125.00');
// 125
echo cleanNumber('966.70');
// 966.7
echo cleanNumber(844.011);
// 844.011
D..
When I used Eclipse to add unimplemented methods to a Java class to fix an error, methods were auto-generated and include // TODO Auto-generated method stub
Is there an easy way to view all methods w..
Here is what I want, inside the BACKUPDIR, I want to execute cscript /nologo c:\deletefile.vbs %BACKUPDIR% until number of files inside the folder is greater than 21(countfiles holds it).
Here is my c..
As the title suggests, what does "javax.naming.NoInitialContextException" mean in non technical terms? And what are some general suggestions to fix it?
EDIT (From the console):
javax.naming.NoInitia..
I'd like to create an in-memory array variable that can be used in my PL/SQL code. I can't find any collections in Oracle PL/SQL that uses pure memory, they all seem to be associated with tables. I'..
Please consider the following
$ R --vanilla
> as.Date("01 Jan 2000")
Error in charToDate(x) :
character string is not in a standard unambiguous format
But that date clearly is in a standard..
Is there a specification somewhere listing the correct way to pass GET variables to a URL?
Normally I do it like this (first variable indicated by ?, second and subsequent indicated by &:
http:/..