Search how to

1710813 results
3

votes
2

answer

How to define how much to scrollTop?

I am loading content via ajax into #list, so I am calculating how much it needs to scroll based on the height of #list but I need to get 200px less. Once the ajax is finished to load I am running: var pos = jQuery("#list").innerHeight() - 200; Once the height is calculated and I set it in a var I am...
rob.m
2

votes
4

answer

how to replace '\\\' to '\'?

my code is not working ? and i dont want to use str_replace , for there maybe more slashes than 3 to be replaced. how can i do the job using preg_replace? my code here like this:
mingfish_004
0

votes
4

answer

How to convert to asynctask?

My activity works fine using thread but when there is 10 or more images to fetch from web server database, it takes lot of time. From googling, I have seen that asynctask is a better option, but I am not able to implement it. Here is my thread class public class Ongoing extends Activity implements O...
ess.crazy
1

votes
2

answer

How to write to UIImage?

This code is not working and i do not understand the mistake. Please help. -(UIImage *)addText:(UIImage *)img text:(NSString *)text1 { int w = img.size.width; int h = img.size.height; //lon = h - lon; char* text = (char *)[text1 cStringUsingEncoding:NSASCIIStringEncoding]; CGColorSpaceRef co...
Aditya Athavale
40

votes
6

answer

How to connect to LocalDb

I installed LocalDb using the SqlLocalDb.msi package and I can connect to it using SSMS using the server name (LocalDb)\v11.0. So far so good. The problem is that when I try to connect to it via a .NET 4.5 application I get the error The server was not found or was not accessible. I started with th...
Manuel
4

votes
3

answer

How to compare to System.Type?

In DataSet.Tables[0].Columns[0] we have a DataType property. Now, I would like to iterate over Columns and perform some action depending on the Type in DataType. How to do this? foreach(var c in DataSet.Tables[0].Columns) { if (c.DataType == System.String) {} //error 'string' is a 'type', which is n...
Wodzu
7

votes
1

answer

How to contribute to spring?

I have gone through the process (code fork, JIRA account, etc.) to contribute to spring-related projects from GitHub. But I am not sure how to assign a JIRA issue to myself because I don't see any such option on the JIRA instance. Can someone please guide me as I would like to start contributing?
user3668399
4

votes
3

answer

how to render to response?

I am sending list to a template using render_to_response. I am using django shortcuts. Hoe to do that? How to set context instance with a variable?
user12345
2

votes
2

answer

How to connect to DB2?

I have to connect to a DB2 database installed on some other system. I have the machine name of the server, the database name to which I would like to connect to, the port number and the credentials. I do not have any client installed on my system for DB2. I want to use OLEDB connections. Can I achi...
user1840880
1

votes
4

answer

How to forward to j_security_check?

I'm using form based authentication (JBOSS/JAAS) but my form is sending the data to my Servlet so I can perform some checks before trying to login. Now I need to forward to j_security_check but what I tried didn't work (404 error)... How can I redirect/forward to the j_security_check (please note th...
AlfaTeK
1

votes
2

answer

How to convert to procedure

I need help in creating this anonymous block into a procedure. I am new to PLSQL. Any help will be much appreciated. Thank you in advance. I would like this query to run just by calling a procedure. TRUNCATE TABLE dblink_status_tbl; set serveroutput on; -- or equivalent for your client declare -- l...
JCBA
2

votes
3

answer

How to avoid to display '#'?

when I click: + 1 then in the address bar appears '#' in addition to URL ( example.com/index.php?id=1# ). Is there a way to avoid that ?
xRobot
6

votes
4

answer

How to conform to UITabBarControllerDelegate

I have a tabbar based application and do the following to get a reference to the application delegate: MyAppDelegate *appDelegate = [[UIApplication sharedApplication] delegate]; Which then gives this warning: warning: type 'id ' does not conform to the 'UITabBarControllerDelegate' My application de...
4thSpace
3

votes
1

answer

How to conform to MutableCollection?

I have trouble finding documentation on how to conform to MutableCollection. Google is completely empty on that topic. Example, I want to add conformance for GMSPath/GMSMutablePath: import CoreLocation import GoogleMaps extension GMSPath: RandomAccessCollection { public var startIndex: Int { return...
tombardey
2

votes
2

answer

How to convert to m4v

by script or programmatically ? I have a bunch of files that need to be converted wondering if there's a better way than go through the prompts one at a time OS windows Vista/XP
Kumar
3

votes
2

answer

How to post to Google+?

I want to make some application (Google App Engine) which will be fetching some data from other websites and post them in one of my "collections" in Google+. For now I have this code: main.py # -*- coding: utf-8 -*- import webapp2 import httplib2 from googleapiclient.discovery import build from oaut...
BPS
11

votes
2

answer

How to reconnect to RabbitMQ?

My python script constantly has to send messages to RabbitMQ once it receives one from another data source. The frequency in which the python script sends them can vary, say, 1 minute - 30 minutes. Here's how I establish a connection to RabbitMQ: rabt_conn = pika.BlockingConnection(pika.ConnectionPa...
Alan Coromano
2

votes
2

answer

How to contribute to Rails?

I ran into a problem with ActiveRecord serialization. Apparently, it has trouble serializing hashes where ranges are keys. I found the Rails Lighthouse ticket (https://rails.lighthouseapp.com/projects/8994/tickets/3067-activerecord-cant-deserialize-hashes-with-range-keys). I've never contributed to...
user94154
2

votes
2

answer

How to export to excel?

How to export database to excel ? I have table like this : +---------------------------------------------------------------------------------------+ id |title ---------------------------------------------------------------------------------------- 52 | Book A 54 | Pembayaran Dividen PT. Telkom...
N4ta nata
2

votes
2

answer

flash to html5, How to

I have a good knowladge in web development , But in this situation, I'm trying to find the best way to convert flash site to html5 where it supports in all modern browsers and compatible with iphones and tablets, http://www.undergroundcathedral.com/ Please do visit the above link, currently it work...
4

votes
2

answer

How to redirect TO stdout?

I have a UNIX application written in ansi C that writes data directly to a file. This file is specified by one of the argument parameters. For testing purposes, I can use /dev/null for the filename, which effectively redirects the output to nothing. I would like to be able to redirect the output...
Joshua Berry
1

votes
1

answer

How to convert “,” to string[]

I would like to pass a string containing a delimiter, like "," to an F# function, but the caller is getting an error indicating that because "," is not a string[]. [] let main argv = let csv_fileH = initCsvLib "test1.csv" "," The library code below is written to create its own delimiter, but it wou...
octopusgrabbus
28

votes
3

answer

How to tee to stderr?

I want to split stdout so that it is printed both to stdout and stderr. This sounds like a job for tee but the syntax is evading me - ./script.sh | tee stderr Of course, how should stderr actually be referred to here?
djechlin
0

votes
1

answer

How to connect to MongoDB

I am conecting mongo db everyday ,it worked fine but today it troubled me with the below error,can anyone help me please. MongoDB shell version: 2.6.10 connecting to: test 2017-01-10T14:26:13.073+0530 warning: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2017-01-10T14:2...
MMR
1

votes
2

answer

How to format text to ######.##

how to limit text to 6 numbers . 2 numbers ? (######.##) thank's in advance
Gold
7

votes
1

answer

How to write to ContactStore.Contact.Phones?

From my app I create contacts using StoredContact and the ContactStore, setting the mobile phone number using KnwonContactProperties.MobileTelephone via GetPropertiesAsync. This is fine, and I can see the mobile phone number in People. But... If I try to access the contacts programatically via Conta...
Benjol
1

votes
5

answer

Java to JSP. How to?

i have written a java program which currently runs as a desktop app, it is returning all results accurately as required in the console. I am now faced by a challenge to convert this application to a web application (JSP). Currently, the code for my projects is in user/workspace (as i am using eclip...
Mponnada
3

votes
4

answer

How to replace [at] to @?

I'm wondering how to replace [at] to @ when jQuery loads... This code myself[at]myemail.com If you think is not useful against spambots... your suggestions are always welcome!
Ivan
4

votes
2

answer

How to concat to sources?

I have the following code: const Cycle = require('@cycle/core'); const {Observable} = require('rx'); function main(sources) { const B$ = sources.driverA .concat(Observable.just('b')) .concat(Observable.just('c')); const C$ = sources.driverB.map(x => x.toUpperCase()); return { driverA: Observable.jus...
dypsilon
1

votes
1

answer

How to unwrap_or to String

When using unwrap_or, how do I get a String? I've distilled my problem down to this (with more type annotation than needed): fn main() { let mut blah: String; let opt: Option = Some("foo"); blah = opt.unwrap_or("bar"); } This (reasonably) tells me that we need a String not a &str. error[E0308]: mis...
Martin Algesten
6

votes
1

answer

How to downgrade to 1.3.0

Im using win xp and got upgraded to 1.3.1 which is not xp compatabile so login keeps failing. https://windows.github.com/release-notes.html How to downgrade to 1.3.0? Thanks
Noitidart
2

votes
3

answer

How to go to declaration?

Delphi XE2 starter for me, but maybe a general answer will help others ... In NetBeans I can hover my curosr over a variable or function call and press ctrl+B to go to its declaration .... how do I do that in Delphi?
Mawg
2

votes
0

answer

How to login to Picasa

I have only found fragments, unsupported code, or google alpha libraries to login to Picasa. Anyone know where I can find a more complete example? Ideally without dependencies on half the universe? Something like the facebook SDK. Or should I install the picasa app? If so -- where can I find an ex...
Johan vdH
1

votes
8

answer

How to convert to datetime

I have a dropdownlist that displays time. For example 8:00AM or 8:30AM. When I save this time to database, I want to save as todays date + time. eg: 8:00AM as 03/30/2009 8:00:00:000. Can anybody give appropriate code to convert as shown above? I tried Convert.ToDateTime(ddlStartTime.SelectedItem.Te...
user42348
5

votes
1

answer

How to contribute to apache?

I am an intermediate Java learner .I want to contribute to Apache Development,I saw there is a list of Apache Projects(like Hadoop,Derby etc),I have developed certain queries which I would like to get answered :- what all Apache projects use Java ? which apache project will be easier to start with f...
progit
1

votes
1

answer

how to “usb to tty”?

I'm new to the C++ world but have strong knowledge in several languages (so i'm not THAT lost). I just received an usb missile launcher as a gift and wanted to control it via different platforms, including web. To do so, i was planning to use a "serial to socket" proxy i wrote in python (and then us...
y_nk
2

votes
3

answer

How to push_back to subvector?

I have a vector< vector > and want to add a string to the inside vector with push_back(). This is what I tried: vector< vector > sorted_word_vecs; char word_read[MAX_WORD_LENGTH]; for(int i = 0; i < num_of_pipes; i++) { while (fgets(word_read, MAX_WORD_LENGTH, pipe_read_from_sort[i]) != NULL) { word...
Marty
0

votes
0

answer

how to sendMessage to Qwidget

i have a compiled program that is based on QT library and have a toolbar that it is a Qwidget object. i want to use sendMessage() to click on a specific button that is placed in that toolbar(QWidget) if i use sendMessage() i need to know handle of button, but when checking handles by softwares like...
Ali Damirchy
7

votes
1

answer

How to saveAsTable to s3?

It looks like this will error out df.write() .option("mode", "DROPMALFORMED") .option("compression", "snappy") .mode("overwrite") .bucketBy(32,"column") .sortBy("column") .parquet("s3://...."); With error Exception in thread "main" org.apache.spark.sql.AnalysisException: 'save' does not support buc...
ForeverConfused
2

votes
3

answer

How to append to window.onload?

I have a function, foo, that I would like to add to window.onload however my problem is that there is already another function, bar, set to window.onload. How can I get both functions attached. I have no access to change the logic of how bar is added to window.onload therefore I can’t use the para...
brucebomber