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..
Below is my code
IMG http://imageshack.us/a/img812/7017/98qq.jpg
When I click on Submit button in my page, I have to get dropdownlist values and I have to send it to another page.
I have followed f..
I have a directory with roughly 100000 files in it, and I want to perform some function on all files beginning with a specified string, which may match tens of thousands of files.
I have tried
ls my..
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'm trying to retrieve the id of one table A to insert into another table B. I cannot use last_insert_id() as i have not inserted anything into A. Any ideas on how to do this nicely?
$n = mysql_query..
I have a multi-index data frame with columns 'A' and 'B'.
Is there is a way to select rows by filtering on one column of the multi-index without resetting the index to a single column index?
For ..
I have this script:
<script>
$(document).ready(function () {
$("#changeResumeStatus").click(function () {
$.get("{% url 'main:changeResumeStatus' %}", function (data) {
..
What is the difference between TCP and UDP?
I know that TCP is used in the case of non-time critical applications, and UDP is used for games or applications that require fast transmission of data. I..
I'd like to test an abstract class. Sure, I can manually write a mock that inherits from the class.
Can I do this using a mocking framework (I'm using Mockito) instead of hand-crafting my mock? How?..
I'm trying to use get_or_create for some fields in my forms, but I'm getting a 500 error when I try to do so.
One of the lines looks like this:
customer.source = Source.objects.get_or_create(name="W..
Edit: I wanted to come back to note that the problem wasn't on my end at all, but rather with with code on the other company's side.
I'm trying to pull up a page using Basic Authentication. I keep ge..
About a month ago Mitt’s question went unanswered. Sadly, I’m running into the same situation now.
http://api.jquery.com/change/#comment-133939395
Here’s the situation: I’m using jQuery to c..
I want to return virtual table from stored procedure and I want to use it in dataset in c# .net. My procedure is a little complex and can't find how to return a table and set it in a dataset
Here is..
How do I run a PowerShell script?
I have a script named myscript.ps1
I have all the necessary frameworks installed
I set that execution policy thing
I have followed the instructions on this MSDN hel..
I have an API request which returns the following:
{"page": 1,
"results": [
{
"poster_path": "/9O7gLzmreU0nGkIB6K3BsJbzvNv.jpg",
"adult": false,
"overview": "Framed in the 194..
I am working with WordPress 3.5.8. Yesterday I made some changes into it to a friend. I don't know what happened, but after some time when I try to log in at wp-admin side and execute URL www.mysite.c..
li = [0, 1, 2, 3]
running = True
while running:
for elem in li:
thiselem = elem
nextelem = li[li.index(elem)+1]
When this reaches the last element, an IndexError is raised (as i..
Say, for example, you are building a project on Backbone or whatever and you need to load scripts in a certain order, e.g. underscore.js needs to be loaded before backbone.js.
How do I get it to conc..
I am trying to create a simple HTML log-in that is placed in a box. I want to have something like this:
I have tried a few things but they all seem to have been in vain. Here is my code thus far. H..
I want to add javascript array values into JSON values object. The other element is also replaced my element like recipients, subject, message. I got Json like:
Below is my code.
var BODY = {
..
I'm trying to use the
npm install steam
but I am getting an error saying
I'm not sure how to fix this and I have gotten this on two different npm module installs. I can install other modules ho..
I am using a table with alternate row color with this.
_x000D_
_x000D_
tr.d0 td {_x000D_
background-color: #CC9999;_x000D_
color: black;_x000D_
}_x000D_
tr.d1 td {_x000D_
background-color: #999..
The following fails with the error prog.cpp:5:13: error: invalid conversion from ‘char’ to ‘const char*’
int main()
{
char d = 'd';
std::string y("Hello worl");
y.append(d); // Line 5 -..
Is there an option to ignore case with .contains() method?
I have an ArrayList of DVD object. Each DVD object has a few elements, one of them is a title. And I have a method that searches for a speci..
I tried to use following code to get screen width and height in android app development:
Display display = getWindowManager().getDefaultDisplay();
int screenWidth = display.getWidth();
int screenHei..
right here is a block of my code. It works perfect in fireFox and Chrome. But not in IE. I get the error "Object doesn't support property or method 'includes'"
function rightTreeSwapfunc2() {
if ..
As title says, I'm stuck on finding a way to get the first and last date of the current month with JavaScript or jQuery, and format it as:
For example, for November it should be :
var firstdate = '1..
How can I close the socket connection on the client side?
I am using:
socket.io 0.9
node.js 0.10.15
express 3.3.4
i.e.:
call localhost/test
-- server side
var test = io
.of('/test')
.on('conne..
I can't seem to login to my tutorial database development environment:
Ayman$ mysql -u blog -p blog_development
Enter password:
ERROR 1049 (42000): Unknown database 'blog_development'
I can login..
How can I position my loading indicator in the center of the screen. Currently I'm using a little placeholder and it seems to work fine. However, when I scroll down, the loading indicator stays right ..
I'm using jquery, and I have a textarea. When I submit by my button I will alert each text separated by newline.
How to split my text when there is a newline?
var ks = $('#keywords').val().split("..
<div id="tagscloud">
<span></span>
</div>
How would I do to add some text within the span like code below ?
<span>**tag cloud**</span>
Edit:
actually the..
So I am trying to get a servlet to add a Java object to the session of the user, when this servlet is requested. But after the servlet redirects to the next page and I try to retrieve the object, I ge..
Hi i have a string in Base64 format. I want to convert it ot a bitmap and then display it to an ImageView. This is the code:
ImageView user_image;
Person person_object;
@Override
protected void onCre..
HTTP has HTTP Cookies. Cookies allow the server to track the user state, the number of connections, last connection, etc.
HTTP has persistent connections (Keep-Alive) where several requests can be se..
Is there any way to write error log or exception into a file in java. i have gone through Log4j. I googled about it but diidnt find a good solution. I have written a simple code
catch (Exception e) ..
I am new to android. I am designing an android application that receives serial data from a hardware device through bluetooth. I am working on Htc desire S. I used the sample Bluetooth chat code to re..
A new feature of Visual Studio 2013 is the ability to sign in with a Microsoft Account and have your settings be persisted across all of your instances of Visual Studio, amongst other things.
When I ..
Apparently, the following is the valid syntax:
my_string = b'The string'
I would like to know:
What does this b character in front of the string mean?
What are the effects of using it?
What are a..
I have MinGW on my windows 7 machine. I wish to install and use complete gcc for C compiler. I found there is no single pre-compiled ready-made installation file for this purpose. I checked the follow..
I am new to json format. I want to create a following json string by using C# and json.net package.
This is my target Json format:
{
"GetQuestions":
{
"s1":"Q1,Q2",
"s2":"Q1,Q3",
"s..
I have this two classes. My main Activity and the one that extends the AsyncTask, Now in my main Activity I need to get the result from the OnPostExecute() in the AsyncTask. How can I pass or get the ..
I have read several questions with answers here in SO concerning serialization and deserialization between java.time.LocalDateTime and JSON property but I can't seem to get it working.
I have managed..
In Java, I am trying to parse a string of format "###.##" to a float. The string should always have 2 decimal places.
Even if the String has value 123.00, the float should also be 123.00, not 123.0...
I have a basic html file which is attached to a java program. This java program updates the contents of part of the HTML file whenever the page is refreshed. I want to refresh only that part of the pa..
I am using C# and Windows Forms. I have a normal progress bar working fine in the program, but now I have another operation where the duration cannot be easily calculated. I would like to display a pr..
I am trying to convert a program for multibyte character to Unicode.
I have gone through the program and preceded the string literals with L so they look like L"string".
This has worked but I am now..
I am using .NET 3.5 framework of VB.NET 2008.
I have some textboxes in my form. I want the tab-like behavior when my user presses ENTER on one of my textboxes. I used the following code:
Private Sub..
If I include <stdlib.h> or <stdio.h> in a C program I don't have to link these when compiling but I do have to link to <math.h>, using -lm with gcc, for example:
gcc test.c -o test ..
I have a string with a C# program that I want to write to a file and always overwrite the existing content. If the file isn't there, the program should create a new file instead of throwing an except..
how to convert a string in array in php i.e
$str="this is string";
should be like this
arr[0]=this
arr[1]=is
arr[2]=string
The str_split($str, 3); split the string in 3 character wo..
I was curious to know how I can round a number to the nearest whole number. For instance, if I had:
int a = 59 / 4;
which would be 14.75 if calculated in floating point; how can I store the result ..
What I want to do, is to save an image to the internal memory of the phone (Not The SD Card).
How can I do it?
I have got the image directly from the camera to the image view in my app its all worki..
I am new to Jackson and I was writing some code for practice. I found out the the new version of Jackson library can be found on Fasterxml: Jackson, so I added the below dependencies to my Maven pom f..
Im using jQuery datepicker
the format of the datepicker is this 08/25/2012
i have errors when inserting to my database it insert only 0000-00-00 00 00 00
my codes is
<?php
$id = $_POST['id'];
$n..
Possible Duplicate:
Making a flat list out of list of lists in Python
Join a list of lists together into one list in Python
I have many lists which looks like
['it']
['was']
['annoying'..
I am using PIL to resize the images there by converting larger images to smaller ones. Are there any standard ways to reduce the file size of the image without losing the quality too much, lets say th..
I am trying to learn to open a modal dialog box at the click of the button in AngularJS but unable to do so. I checked the chrome console but there are no errors. Also, since I am learning AngularJS, ..
There, is for example, ViewBag property of ControllerBase class and we can dynamically get/set values and add any number of additional fields or properties to this object, which is cool .I want to use..
I am trying to write into a csv file row by row using C# language. Here is my function
string first = reader[0].ToString();
string second=image.ToString();
string csv = string.Format("{0},{1}\n", fir..
I have the following plot:
import matplotlib.pyplot as plt
fig2 = plt.figure()
ax3 = fig2.add_subplot(2,1,1)
ax4 = fig2.add_subplot(2,1,2)
ax4.loglog(x1, y1)
ax3.loglog(x2, y2)
ax3.set_ylabel('hello..
Does anyone know how to use VBA to pull data from SAP Netweaver?
I have a number of daily reports that require exporting data from SAP to Excel and formatting it into a report. I have already written..
I would like to configure Apache 2 running on Kubuntu to execute Perl CGI scripts. I've tried some steps that I came across by googling, but nothing seems to work.
What is the right way of achieving ..
In my thread (using boost::thread) I need to retrieve the current time in ms or less and to convert into ms:
Actually, reading here I've found this:
tick = boost::posix_time::second_clock::local_tim..
I would like to create a (non-anonymous) function that sorts an array of objects alphabetically by the key name. I only code straight-out JavaScript so frameworks don't help me in the least.
var peop..
I am trying to precompile assets using the command rake assets:precompile RAILS_ENV=production, but I always get the error below.
** Invoke assets:precompile (first_time)
** Execute assets:precom..
I am trying to add a file to my repository on BitBucket and I am having trouble.
I am using GIT and this is what I type in
$ cd lis4368/assignments
$ git remote
$ git remote -v
$ git remote rm orig..
Here is my mongod.cfg file:
bind_ip = 127.0.0.1
dbpath = C:\mongodb\data\db
logpath = C:\mongodb\log\mongo-server.log
verbose=v
Here is my mongod service command:
mongod -f c:\mongodb\mongod.cfg -..
I have a branch 'firstproject' with 2 commits. I want to get rid of these commits and make them appear as a single commit.
The command git merge --squash sounds promising, but when I run git merge -..
I'm trying to change the colour of the active or current page navigation link which is selected by the user on my website. What am I doing wrong? Thanks.
So far the CSS looks like this:
div.menuBar
..
Github announced Atom which is very similar to Sublime. Even some keyboard shortcuts like ? + P, ? + Shift + P etc. are same.
How is Atom different from Sublime?
Does it include IDE features lik..
What is the difference between these two methods - System.exit() and JFrame.dispose()?
If we want to close a Java Swing application when a button is clicked, which method should I use?..
I have a bunch of long-running scripts and applications that are storing output results in a directory shared amongst a few users. I would like a way to make sure that every file and directory created..
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..
Getting url: (6) Could not resolve host: application error after this command :
curl -i -H 'Content-Type: application/json' -d '{"Code":"FR","Name":"France"}' http://127.0.0.1:8080/countries
Full e..
Possible Duplicate:
What is the use of making constructor private in a class?
Where do we need private constructor? How can we instantiate a class having private constructor? ..
Possible Duplicate:
c# - How do I round a decimal value to 2 decimal places (for output on a page)
I want to truncate the decimals like below
i.e.
2.22939393 -> 2.229
2.22977777 -> 2.229..
I have a table with a column that stores the date and time. I need to write a query to get only the date from that column,
SELECT CAST(CONVERT(VARCHAR, LoginTime, 101) AS datetime) FROM AuditTrail
..
I know how to get the root view with View.getRootView(). I am also able to get the view from a button's onClick event where the argument is a View. But how can I get the view in an activity?..
I want to create a captcha pic by use convert from ImageMagick.
And I follow this, but there are some problem .
Input In my linux shell:
convert -background white -fill black -font FreeSerif-Bold -..
I have a question that might seem fairly simple (of course if you know the answer).
A certain function I have calls another function but I want to continue execution from the caller even though the c..
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..
I am aware of using .gitignore file to exclude some files being added, but I have several config.php files in source tree and I need to exclude only one, located in the root while other keep under rev..
I am using Retrofit to access my REST API. However, when I put my API behind ssl and access it by http://myhost/myapi then I get this error:
Do I need to do something extra now that my API is behind ..
In 2010, would you serve URLs containing UTF-8 characters in a large web portal?
Unicode characters are forbidden as per the RFC on URLs (see here). They would have to be percent encoded to be standa..
I'm wondering how to ignore a parent style and use the default style (none). I'll show my specific case as an example but I'm pretty sure this is a general question.
<style>
#elementId select {..
I think I misunderstood the meaning of cascading in the context of a @ManyToOne relationship.
The case:
public class User {
@OneToMany(fetch = FetchType.EAGER)
protected Set<Address> us..
What is the fastest way to check if a string matches a regular expression in Ruby?
My problem is that I have to "egrep" through a huge list of strings to find which are the ones that match a regexp t..
Whats the prettiest way to compare one value against multiples options?
I know there are loads of ways of doing this, but I'm looking for the neatest.
i ask because i'd hoped this was workable (it i..
I am using this code but the modal is too thin:
<div class="modal fade bs-example-modal-lg custom-modal" tabindex="-1" role="dialog" aria-labelledby="myModal" aria-hidden="true" id="myModal">
..
I am developing a REST API in ASP.Net Web API. My API will be only accessible via non-browser based clients. I need to implement security for my API so I decided to go with Token based authentication...
Is there any site available online for verifying the syntax which conforms to multiple databases?
For example: If I have a SQL statement with a 'usage' keyword, then the site should throw me an error..
I'm trying to make a gridview with two columns. I mean two photos per row side by side just like this image.
But my pictures have spaces between them, due to the fact that it's not the same size. H..
Project Euler and other coding contests often have a maximum time to run or people boast of how fast their particular solution runs. With Python, sometimes the approaches are somewhat kludgey - i.e., ..
I have different Activities in my App and in all of them I do not want the Action Bar. I cannot find how to disable it. I have tried to find an attribute to apply it to the main_activity.xml but so fa..
Possible Duplicate:
MySQL Error 1153 - Got a packet bigger than ‘max_allowed_packet’ bytes
Hi I am getting the error :
[1153] Got a packet bigger than 'max_allowed_packet'bytes
but I ..
this might be one of those days my brain just does not work, or i'm incredibly dumb. i've been trying to copy files (which are actually directories .app, .bundle, etc.) but consistently get an error '..
If I convert an image (jpg or png) to base64, then will it be bigger, or will it have the same size? How much greater will it be?
Is it recommended to use base64 encoded images on my website?..
I'd like to access the value of a dynamic c# property with a string:
dynamic d = new { value1 = "some", value2 = "random", value3 = "value" };
How can I get the value of d.value2 ("random") if I onl..
Is it possible to specify a custom thread pool for Java 8 parallel stream? I can not find it anywhere.
Imagine that I have a server application and I would like to use parallel streams. But the appl..
I submitted a brand new app to AppStore and it got rejected by the Lords ... (nothing new there). What I want to do is delete that app completely from my itunesconnect account. I don't know what apple..
$ ls *mp3 | xargs mplayer
Playing Lemon.
File not found: 'Lemon'
Playing Tree.mp3.
File not found: 'Tree.mp3'
Exiting... (End of file)
My command fails because the file "Lemon Tree.mp3..
I have a RESTful API that I have exposed using an implementation of Elasticsearch on an EC2 instance to index a corpus of content. I can query the search by running the following from my terminal (Mac..
I am trying to convert 65529 from an unsigned int to a signed int. I tried doing a cast like this:
unsigned int x = 65529;
int y = (int) x;
But y is still returning 65529 when it should return -7. ..
i'm using Paramiko to connect through ssh to a server.
Basic authentication works well, but i can't understand how to connect with public key.
When i connect with putty, the server tell me this:
Us..
After the Android Studio 2.0 update while the gradle build finishes I get this :
Session 'app': Error Launching activity .
It prevents the app from starting but it's installed in my emulator.
This is..
I have very simple problem that I can't solve. I need to do something like this:
select distinct * from (1, 1, 1, 2, 5, 1, 6).
Anybody can help??
Edit
The data comes as a text file from one of o..
I have a table and, somehow, the same person got into my Person table twice. Right now, the primary key is just an autonumber but there are two other fields that exist that I want to force to be uniqu..
I have a C++/Obj-C background and I am just discovering Python (been writing it for about an hour).
I am writing a script to recursively read the contents of text files in a folder structure.
The pro..
I have a controller with the following signature:
[Route("products/filter/{apc=apc}/{xpc=xpc}/{sku=sku}")]
public IHttpActionResult Get(string apc, string xpc, int? sku)
{ ... }
I call this method ..
Note: This question is only relevant for Grunt 0.3.x and has been left for reference. For help with the latest Grunt 1.x release please see my comment below this question.
I'm currently trying to use..
Please help me to translate this pseudo-code to real php code:
foreach ($arr as $k => $v)
if ( THIS IS NOT THE LAST ELEMENT IN THE ARRAY)
doSomething();
Edit: the array may have num..
I'm embedding pdf files using something like this:
<div class="graph-outline">
<object style="width:100%;" data="path/to/file.pdf?#zoom=85&scrollbar=0&toolbar=0&navpanes=0" t..
How in the world do you get just an element at index i from the List in scala?
I tried get(i), and [i] - nothing works. Googling only returns how to "find" an element in the list. But I alr..
I haven't been able to figure this out yet. Atom seems to use spaces as the default indentation mode. I prefer to have tabs instead though. Sublime Text has built in functionality for switching and co..
HTML5 defines several embedded content elements, which, from a bird's-eye view, seem to be very similar to the point of being largely identical.
What is the actual difference between iframe, embed an..
I have a Transfer class, simplified it looks like this:
public class Transfer
{
public virtual IFileConnection source { get; set; }
public virtual IFileConnection destination { get; set; }
..
How can I set the dark holo theme in my app?
At this time I got this:
<style name="AppTheme" parent="android:Theme.Holo.Light" />
But when I change it to:
<style name="AppTheme" parent="a..
Is there a way to use javascript and JQuery to add some additional fields to be sent from a HTTP form using POST?
I mean:
<form action="somewhere" method="POST" id="form">
<input type="su..
How can I change the visibility of a control with jQuery? I have a control that its visible property to false (not css).
When I used show() function for it nothing happened, it seems that hide() and s..
I need to sort an array of ints using a custom comparator, but Java's library doesn't provide a sort function for ints with comparators (comparators can be used only with objects). Is there any easy w..
I have an array of numbers from 1 to 100 (both inclusive). The size of the array is 100. The numbers are randomly added to the array, but there is one random empty slot in the array.
What is the quic..
Basically I'm trying to pass a URL like this:
www.foobar.com/?first=1&second=12&third=5
into a URL like this:
http://www.facebook.com/sharer.php?&t=FOOBAR&u=http://www.foobar.com/f..
I am trying to do a simple condition check, but it doesn't seem to work.
If $# is equal to 0 or is greater than 1 then say hello.
I have tried the following syntax with no success:
if [ "$#" == 0 -..
If I do
url = "http://example.com?p=" + urllib.quote(query)
It doesn't encode / to %2F (breaks OAuth normalization)
It doesn't handle Unicode (it throws an exception)
Is there a better library?..
How can I check if a variable is empty in Javascript? Sorry for the stupid question, but I'm a newbie in Javascript!
if(response.photo) is empty {
do something
else {
do something else
}
re..
Does anybody know of a simple way of taking a date (e.g. Today) and going back X days, X months and X years?
I have tried that:
var date = new Date();
$("#searchDateFrom").val((date.getMonth() -1 ) ..
If I have 2 synchronized methods in the same class, but each accessing different variables, can 2 threads access those 2 methods at the same time? Does the lock occur on the object, or does it get as ..
I need to get the location of the home directory of the current logged-on user. Currently, I've been using the following on Linux:
os.getenv("HOME")
However, this does not work on Windows. What is ..
I have a spring boot application.
I have three profiles in my application-> development, staging and production. So I have 3 files
application-development.yml
application-staging.yml
application-p..
How do I return 3 separate data values of the same type(Int) from a function in swift?
I'm attempting to return the time of day, I need to return the Hour, Minute and Second as separate integers, but..
I just want to format current date into yyyymmdd in DB2.
I see the date formats available, but how can I use them?
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.d..
How can I adjust only the size of Y-axis labels in R?
I know that cex.axis alters the size of the axis labels but it only affects the x-axis. Why, and how can I adjust the y axis?..
How can I get a list of unique values in an array? Do I always have to use a second array or is there something similar to java's hashmap in JavaScript?
I am going to be using JavaScript and jQuery o..
How can I get React to re-render the view when the browser window is resized?
Background
I have some blocks that I want to layout individually on the page, however I also want them to update when th..
I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other.
One of the images needs to be absolute positioned within the div.
What is the CSS ..
Edit :- Tried to format the question and accepted answer in more presentable way at mine Blog
Here is the original issue.
I am getting this error:
detailed message sun.security.validator.Valida..
In sql server 2008, how to extract only the year from the date.
In DB I have a column for date, from that I need to extract the year.
Is there any function for that?..
I've read the official documentation and all they say is that I should have a error_reporting() function located at the top of your main index.php file. But I don't have index.php file in my project. ..
From the reading that I have done, Core Audio relies heavily on callbacks (and C++, but that's another story).
I understand the concept (sort of) of setting up a function that is called by another ..
I need to test if a variable is set or not. I've tried several techniques but they seem to fail whenever %1 is surrounded by quotes such as the case when %1 is "c:\some path with spaces".
I..
For some reason Eclipse is no longer showing me Java compilation Errors in the Problems View.
It is still showing Warnings.
This has suddenly happened and I cannot think of anything that I have chan..
I have installed php 5.6 and and php 7.1 on my Ubuntu 16.04
I know with Apache as my web server, I can do
a2enmod php5.6 #to enable php5
a2enmod php7.1 #to enable php7
When I disable php7.1 in Apache..
I have this code which on clicking the button "Get more fields" will create a copy of the entire div and create fields. But on clicking the button nothing is happening. All the other buttons are worki..
I just made a perfectly good commit to the wrong branch.
How do I undo the last commit in my master branch and then take those same changes and get them into my upgrade branch?..
I have the code below that hides and shows the navigational bar. It is hidden when the first view loads and then hidden when the "children" get called. Trouble is that I cannot find the event/action..
I am exporting data from a List<> to excel. I want to make some specific rows and cells bold. I need to make some cell merged also.
Below is the code I am using.
try
{
Excel..
I want to remove the border that is coming just outside the drop down list.
I am trying:
select#xyz option {
Border: none;
}
But does not work for me...
I have two datetime.time values, exit and enter and I want to do something like:
duration = exit - enter
However, I get this error:
TypeError: unsupported operand type(s) for -: 'datetime.time'..
I'm trying to import my dataset in R using read.table():
Dataset.df <- read.table("C:\\dataset.txt", header=TRUE)
But I get the following error message:
Error in scan(file, what, nmax, sep, dec..
I'm new to React and I'm trying to import a JSON DATA variable from an external file. I'm getting the following error:
Cannot find module "./customData.json"
Could some one help me? It works if..
Since Python's string can't be changed, I was wondering how to concatenate a string more efficiently?
I can write like it:
s += stringfromelsewhere
or like this:
s = []
s.append(somestring)
late..
I'm completely new to Kotlin. I want to do a login validation using POST method and to get some information using GET method. I've URL, server Username and Password already of my previous project. I d..
I am having a file in the following format
Column1 Column2
str1 1
str2 2
str3 3
I want the columns to be rearranged. I tried below command
cut -f2,1 file.txt
The command..
I'm trying to use xPath to find an element containing a piece of text, but I can't get it to work....
WebElement searchItemByText = driver.findElement(By.xpath("//*[@id='popover-search']/div/div/ul/l..
Is it possible to split a string every nth character?
For example, suppose I have a string containing the following:
'1234567890'
How can I get it to look like this:
['12','34','56','78','90']
..
I don't understand why R gives me a warning about "Longer object length is not a multiple of shorter object length"
I have this object which is generated by doing an aggregate over an xts se..
I'm using Ubuntu 12.04 LTS on my machine.
There is on MySQL server situated remotely. I want to restart it.
Can someone please give me in detail step-by-step instructions to restart the MySQL server..
I want to be able to build a string from a class that I create that derives from Stream. Specifically, I want to be able to write code like this:
void Print(Stream stream) {
// Some code that ope..
Alright I have way to much time invested in this. I am new to PHP programming and trying to grasp the basics, but I am a little lost as of last night I was able to get a PHP form to upload basic data ..
I have a dataset objds. objds contains a table named Table1. Table1 contains column named ProcessName. This ProcessName contains repeated names.So i want to select only distinct names.Is this possible..
I want to check code from the repository http://code.sixapart.com/svn/perlbal/ . I can only access the the repository url by setting a proxy. I guess if I want to get the code from the same URL by svn..
I need to use mapview control in android and I can't seem to understand how to run keytool.
Is it installed with eclipse? I can't seem to find a download link.
Thanks..
I want to open a particular URL without directly opening the browser using only a batch file. I know I can use something like:
START www.google.com
But I want to open a URL without using a browser...
In Python, I can do:
>>> list = ['a', 'b', 'c']
>>> ', '.join(list)
'a, b, c'
Is there any easy way to do the same when I have a list of objects?
>>> class Obj:
... ..
I'm trying to output lists of objects as json and would like to know if there's a way to make objects usable to json_encode? The code I've got looks something like
$related = $user->getRelatedUse..
I want to convert a string into a double and after doing some math on it, convert it back to a string.
How do I do this in Objective-C?
Is there a way to round a double to the nearest integer too?..
I'm trying to create a new object of a type parameter in my generic class.
In my class View, I have 2 lists of objects of generic type passed as type parameters, but when I try to make new TGridView()..
I have a sample Spring Boot app with the following
Boot main class
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(..
Python recognizes the following as instruction which defines file's encoding:
# -*- coding: utf-8 -*-
I definitely saw this kind of instructions before (-*- var: value -*-). Where does it come from..
Trying to get double values from an EditText and manipulate them before passing them to another Intent. Not using primitive data type so I can use toString methods.
Problem is when I include the prot..
I have been following a manual to install a software suite on Ubuntu. I have no knowledge of MySQL at all. I have done the following installations on my Ubuntu.
sudo apt-get update
sudo apt-get instal..
I have a matplotlib plot with a colorbar attached. I want to position the colorbar so that it is horizontal, and underneath my plot.
I have almost done this via the following:
plt.colorbar(orientati..
Hi i want to convert the current date to this format YYYY-MM-DD. However, it will convert the date into String format, but i want to convert it back into Date format. So can anyone advise on this?
Th..
I'm using Typescript with React. I'm having trouble understanding how to use refs so as to get static typing and intellisense with respect to the react nodes referenced by the refs. My code is as foll..
I have a trivial question that has been bothering me for a while. I tried to google this but no one seems to have the same problem as me or doesn't see it as an issue. When I make a button in activity..
I tried to set spinner with drop down arrow but i couldn't fix it can anyone help me with this? I have attached the source code.
my class file:
import android.os.Bundle;
import android.view...
When I clean and then build my solution that has several projects, the output window reports that the build succeeded. However, when I view the Error List Window, it shows me this warning:
Found c..
Programming in Android, most of the text values are expected in CharSequence.
Why is that? What is the benefit, and what are the main impacts of using CharSequence over String?
What are the main dif..
What is the shortest, simplest code to generate the curent month in Full English like September or in abbreviated three letter version like Feb and then add the current Year 2011?
So the code will, d..
I couldn't get transitions to work on this page, anybody has any idea why?
div.sicon a {
transition: background 0.5s linear;
-moz-transition: background 0.5s linear; /* Firefox 4 */
-webk..