I've written an app which contains a large textview for displaying notes. Is it possible to have the textview highlight any phone numbers or hyperlinks without underlining the entire view?
hi!i m getting a photo from the web,but i see it very large..how could i see it with zoom out?this is my code for webView:
public class gavros extends Activity {
WebView browser;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.efimerides);
browser =(WebView)findViewById(R.id.webview);
browser.loadUrl("http://resources.sport-fm.gr/sportfm/newspapers/10/12/24/gavros.jpg");
}}
Have I any chance to serialize meta (any format, so I can store it in DB)?
var obj1 = {};
var obj2 = {};
obj1.link = obj2;
obj2.link = obj1;
var meta = [obj1, obj2];
As I understand the problem is that JSON serialize object`s links to objects.
Currently, my Objective C classes use C++ objects by doing a new when the owner is created, and calling delete when it is destroyed. But is there another way? I'd like to be able to declare, say, an auto_ptr whose scope lasts the duration of the Objective C class' lifetime.
I need to perform a very large sql server insert from a c# application. Somewhere in the range of 20,000 through 50,000 records.
What is the fastest way through SQL server to perform the insert?
There are several options I know of, but I don't know which is the fastest.
insert into MyTable(column1, column2, ..., column*)
select 'value','value',...,'value'
union
select 'value','value',...,'value'
VS
insert into MyTable(column1, column2, ..., column*)
exec('select ''value'',''value'',...,''value'''
'select ''value'',''value'',...,''value''')
VS
bulk insert from a data file
VS
Any better way that you know of :)
Hello,
I would like to know and get an implementation help, if possible,
about the best way to transfer very large amount to pure text from C
to Java using JNI.
thank you
Getting very confused by PHP_AUTH_USER. Within my web pages I have .htaccess files in every directory, controlling who can (and cant) see certain folders. In order to further customise the pages I was hoping to use PHP_AUTH_USER within the PHP code, i.e. tailor page contents based on the user.
This only seems to work partially. The code snippets below hopefully demonstrate my problems.
The main index.php creates a framed page with a menu structure in the top left hand corners, some irrelvant stuff in top right and then the tailor made contents in bottom frame. In top left the user is correctly shown, but in the bottom frame PHP_AUTH_USER doesnt seem to be set anymore (it returns empty and when printing all $HTTP_SERVER_VARS its not listed).
Script.php is in a different path, but they all have .htaccess files in them and all other contents is displayed correctly. Why does it not know about PHP_AUTH_USER there?
Running version php version 5.2.12 on chrome.
index.php
<FRAMESET ROWS="35%, *">
<FRAMESET COLS="25%, *">
<FRAME SRC="Menu.php">
<FRAME SRC="Something.php">
</FRAMESET>
<FRAME SRC="../OtherPath/Script.php?large=1" name="outputlisting">
</FRAMESET>
</FRAMESET>
Menu.php
<ul>
<li>Reporting
<ul>
<li>Link1 <a href="../OtherPath/Script.php" target="outputlisting">All</a>, <a href="../OtherPath/Script.php?large=1" target="outputlisting">Big</a>
</ul>
<?php
echo 'IP Address: ' . $_SERVER['REMOTE_ADDR'] . '<br />';
echo 'User: ' . $_SERVER['PHP_AUTH_USER'];
?>
Script.php
<?php
echo 'User: ' . $_SERVER['PHP_AUTH_USER'];
?>
Is it possible? Run a cvs diff in terminal at the project root that outputs only modified files (like local files that aren't in source control and local modified files).
I'm running cvs diff --brief but I still have too many results since my project is large, and with a lot of subdirectories - it shows the whole hierarchy and I just want to know which files are different from HEAD revision. I'm using Linux.
Is there any efficient way in python to count the times an array of numbers is between certain intervals? the number of intervals i will be using may get quite large
like:
mylist = [4,4,1,18,2,15,6,14,2,16,2,17,12,3,12,4,15,5,17]
some function(mylist, startpoints):
# startpoints = [0,10,20]
count values in range [0,9]
count values in range [10-19]
output = [9,10]
It seems that JMenuItems don't automatically resize any image icon that's assigned to them, and from what I can tell, there isn't a property that makes them automatically do that, either.
Is anyone aware of a way that I can programatically resize the Icon for a JMenuItem? It seems like the Icon object is lacking functionality as it is, unless there's some other function that can actually deal with Icon objects.
Hey all,
I'm currently using SBT to manage my Lift project. I'd like to deploy it, but when I run 'sbt package' it produces a 60MB war file. This seems pretty large - are there ways I could cut down the size?
Thanks!
I need to get some children elements and loop over them using inline javascript for a onmouseover event. When I try to use this.getElementsByName I'm getting an error that the object does not support this property. I was under the impression that getElementsByName work for element objects which I thought 'this' would be considered. Anyone have any other ideas on how I can achieve this?
I'd like to estimate the number of leaves in a large tree structure for which I can't visit every node exhaustively. Is this algorithm appropriate? Does it have a name? Also, please pedant if I am using any terms improperly.
sum_trials = 0
num_trials = 0
WHILE time_is_not_up
bits = 0
ptr = tree.root
WHILE count(ptr.children) > 0
bits += log2(count(ptr.children))
ptr = ptr.children[rand()%count(ptr.children)]
sum_trials += bits
num_trials++
estimated_tree_size = 2^(sum_trials/num_trials)
Hey,
I want to use a method of an object.
Like $myObject->helloWorld().
However there are a couple of methods so I loop through an array of method names and call the method like this:
my $methodName ="helloWorld";
$myObject->$methodNames;
This works quite nice but some objects don't have all methods.
How can I tell whether $myObject has a method called helloWorld or not?
Can someone tell me what the difference is between the following
public class CarCollection:List where T:Car
{
}
and
public class CarCollection:List
{
}
To me they seem to do the same thing, create type-safe collection of "Car" objects.
I'm created a very large map with many poly areas (over 20 coordinates each) for regions within the map. However, you can't add css to the AREA tag as I was told it's not a visible element. What I want to do is when the user hovers over an area on the map, I want it to be "highlighted" by applying a 1px border to the specific AREA element. Is there a way of doing this? No, I'm not going to resort using rectangles.
We have a very large SWF hosted in a website which is just a repository of hundreds of movies/symbols. We load this SWF at the beginning with the Loader class but then the client will access a very few of them at that moment.
Is it possible to tell the loader to download symbols only when they're needed? (as with applicationDomain.getDefinition(...)).
Thanks in advance.
Hello there,
I'd like to change the minimum for the id of created objects from 1 to 1000.
So when I create in rails my first model object it gets the ID 1000 and not 1.
Is there a way to set this in the schema/migration files?
I keep reading about defficiencies and issues with languages. Specifically, I'm learning PHP and Javascript, but I see it everywhere. This question arose while reading Javascript: The Good Parts and PHP Objects, Patterns and Practice. While understanding and avoiding easy pitfalls, is there a way I can learn the fundamentals of OOP and discover solid programming practices without overlooking important areas (or simply becoming jaded)?
I'm sure I'll have plenty of opportunity to learn from mistakes!
Is there a more efficient way than using numpy.asarray() to generate an array from output in the form of a list?
This appears to be copying everything in memory, which doesn't seem like it would be that efficient with very large arrays.
(Updated) Example:
import numpy as np
a1 = np.array([1,2,3,4,5,6,7,8,9,10]) # pretend this has thousands of elements
a2 = np.array([3,7,8])
results = np.asarray([np.amax(np.where(a1 > element)) for element in a2])
I'm creating a game and I create sprites(enemies). I keep creating and destroying sprites. Flash/Flex has a garbage collector which handles the destruction of unused resources. Should I create an object pool to reuse them, or should I leave flash/flex to handle the creation/destruction of objects?
Which option is better from the performance point of view?
I have a PHP webpage that takes which accepts a rather large POST array. I have a button on the page that opens a PHP popup window. Is there a convenient way to pass the entire $_POST array to the popup?
Edit:
It is an entirely different page. I open it with JavaScript: window.open
What is the difference between the createGroup and createGroupIgnoreTooBig?
I understand that createGroup will throw the too big exception when the object exceeds 64k, and createGroupIgnoreTooBig will not. But does it mean that createGroupIgnoreTooBig allows me to create objects larger than 64k, or will it only partially group it?
I need to make map where Dates are keys. 2 date objects are equals if they have the same value of getTime() method.
I'm interested only in year, month and day. How can I trim unnecessary hours and minutes to get 'clear' dates?
I have built two programs in C# and I am sending simple strings through the sockets. This is fine for the moment but in the near future I will need to send more complicated items, such as objects down the sockets and eventually files.
What steps would I take to do this? What purpose do the buffers serve for the sockets/streams? Apologies if I am a little vague.