Search how to

2362488 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
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
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
4

votes
5

answer

How to serialize to dateTime

Working to get DateTimes for any time zone. I'm using DateTimeOffset, and a string, and an XmlElement attribute. When I do, I get the following error: [InvalidOperationException: 'dateTime' is an invalid value for the XmlElementAttribute.DataType property. dateTime cannot be converted to System.Str...
david valentine
2

votes
1

answer

How to listen to JTextArea

I'm creating a personal Java terminal, and I need it to do a couple of things that I'm not quite understanding right now. I need the program to listen to what is being input into the JTextArea, while also knowing that the program will always display [USERNAME]@[OPERATING SYSTEM]:~$ when 'Enter' has...
Nathan Kreider
4

votes
2

answer

How to Convert to UTC

I'm getting dates & times from various sources (e.g. file's date/time from FTP server, email's date/tiem received, etc.) and need to store them all as UTC (so they all have a common reference). How do I do this? What pieces of information do I need in order to properly do the conversion. This is for...
6

votes
2

answer

How to connect to AVD

i'm trying to write my own android http server. It's quite OK but i have a problem with my AVD. I don't want to download my app to phone everytime I want to test changes. I would like to connect to my app via AVD. To get the ip address i'm using this function: private String getLocalIpAddress() { tr...
Gaski
2

votes
2

answer

How to compare to none

I have the following block of data: client: ['id' '1234' 'name' 'foobar' 'custom_ip' none] Strangely, comparing to 'none' never seems to work. if none = (select client 'custom_ip') [print 'YAY!'] Though when I print select client 'custom_ip' it returns 'none'. Why is this? What can I do to determin...
Darrell Brogdon
3

votes
1

answer

How to login to phppgadmin

Ok, My first day with postgresql. I've downloaded and installed postgresql (to Windows), and it asked me to set a password (say: 1234). Then I downloaded phppgadmin, and trying to login to pgadmin. I tried root:1234 postgres:1234 I can't login and also get the following php error from pgadmin ( ! )...
marvin
4

votes
2

answer

How to connect to wifi

Can it be done? Opening the wifi settings is possible, but I dont know how to connect to a specific wifi network. this code: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@'prefs:root=WIFI']]; opens the iPhone wifi settings dialog. Is there any way to compose the URL name? For exam...
user1581203
1

votes
2

answer

How to convert to double

I validate the fonction of extract gps latitude and longitude with regex, but currently it's a String , and map_view accept only double previous problem : how to display a regex result in flutter I tried to use this to convert in double but it doesn't work RegExp regExp = new RegExp( //He...
Quentin Guichot
1

votes
1

answer

How to Json To Xml

I am new for Json and I have a simple problem. I am trying to convert json file to xml file with c#. But it throw an exception. The Code is ; private void TakeXML() { string json = ReadText(); XmlDocument doc = (XmlDocument)Newtonsoft.Json.JsonConvert.DeserializeXmlNode(json); XmlTextWriter writer...
Sinan Türemiş
1

votes
1

answer

How to get to Dashboard

(I Am just getting started with Parahna CMS. It seems like exactly what I need, but I am having trouble getting started). I walked through the steps in the Getting Started post, and now have an MVC 5 project, with Parahna CMS installed through Nuget. I updated the config so it connects to the datab...
Greg Gum
1

votes
2

answer

How to authenticate to RabbitMQ?

I want start using the rabbitmq client, to receive datas from a queue. This queue is online, and I have all the informations to create a connection to it: host username password virtual host port I wrote an application in java to create a connection using the ConnectionFactory class: import com.rabb...
optimusfrenk
1

votes
2

answer

How to redirect to https

I installed SSL and now I want to redirect my domain name to HTTPS . my .htaccess file has this configuration provided by my CMS RewriteEngine On RewriteCond %{HTTPS} off RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{HTTP_HOST} !^www\. RewriteRule .* http://www.%{HTTP_HOS...
PropertyFinder.Pk
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
0

votes
3

answer

how to reach to value

I have this object in my session name: 'test', is_feature: '0', attributes: [ { '5': 'blue' }, { '7': 'iOS' } ], cost: '2000', I want to use attributes in foreach.some thing like below code: foreach ($product->attributes as $attribute){ ProductAttributeValue::create([ 'attribute_id' => $attribu...
mohammad Hosseini
1

votes
1

answer

qbasic to python how to

I am trying to convert some old qbasic (a old dos basic) code to python. I know python but not much qbasic (other than guessing the meaning of the syntax). This is the qbasic code 1020 DIM XS(499), A(504), V(99) 1560 GOSUB 2600 'Get coefficients 2600 REM Get coefficients 2660 CODE$ =...
user35202