I have 5 lines of code as function which is being called 100000 times is there a way to make the function inline so that I don't experienced a call overhead in PL/SQL.
I am looking for an algorithm to wrap text within a non-rectangular shape, preferably based on the Knuth and Plass algorithm. The hardest part of this is that the lines may have different heights due to differing font sizes in the text. The image below is an example of what the algorithm should be able to generate.
Thanks for any help!
Hello!
I have list of IPs:
238.51.208.96/28
238.51.209.180-199
238.51.209.100-109
238.51.213.2-254
...
How can I easily parse them? I need first and last IP from range.
For First line I can use Net::Netmask CPAN module, but what can I do with others lines?
Suppose that you have a big Data Entry Web Application Like Microsoft CRM, what is the strategies and technologies that you follow to build a website like it?
I don't want to use any Dynamic Web Page Generation software, because it have a lot of limitations..
Also I don't want to design every page and repeat everything
what's the best approach?
Any Ideas or Head lines on this issue?
Thanks in Advance...
Are there standard optimization tricks for Objective-C to make for faster execution along the lines of "inlining" frequent methods as in C++ or the "g++ -fast" tag?
Suppose you have a Django view that has two functions:
The first function renders some XML using a XSLT stylesheet and produces a div with 1000 subelements like this:
<div id="myText">
<p id="p1"><a class="note-p1" href="#" style="display:none" target="bot">?</a></strong>Lorem ipsum</p>
<p id="p2"><a class="note-p2" href="#" style="display:none" target="bot">?</a></strong>Foo bar</p>
<p id="p3"><a class="note-p3" href="#" style="display:none" target="bot">?</a></strong>Chocolate peanut butter</p>
(etc for 1000 lines)
<p id="p1000"><a class="note-p1000" href="#" style="display:none" target="bot">?</a></strong>Go Yankees!</p>
</div>
The second function renders another XML document using another stylesheet to produce a div like this:
<div id="myNotes">
<p id="n1"><cite class="note-p1"><sup>1</sup><span>Trololo</span></cite></p>
<p id="n2"><cite class="note-p1"><sup>2</sup><span>Trololo</span></cite></p>
<p id="n3"><cite class="note-p2"><sup>3</sup><span>lololo</span></cite></p>
(etc for n lines)
<p id="n"><cite class="note-p885"><sup>n</sup><span>lololo</span></cite></p>
</div>
I need to see which elements in #myText have classes that match elements in #myNotes, and display them. I can do this using the following jQuery:
$('#myText').find('a').each(function() {
var $anchor = $(this);
$('#myNotes').find('cite').each(function() {
if($(this).attr('class') == $anchor.attr('class')) {
$anchor.show();
});
});
However this is incredibly slow and inefficient for a large number of comparisons.
What is the fastest/most efficient way to do this - is there a jQuery/js method that is reasonable for a large number of items? Or do I need to reengineer the Django code to do the work before passing it to the template?
I am trying per instructions here:
http://www.innovation.ch/java/HTTPClient/advanced_info.html
However, if I am using HTTP Builder, the following lines
System.setProperty("HTTPClient.cookies.save","true")
System.setProperty("HTTPClient.cookies.jar","/home/misha/.httpclient_cookies")
do not seem to create a file:
~/.httpclient_cookies
I will post a solution as always when figure it out.
:)
Misha
Hi,
How can I number several equations in a align environment using only one number?
For example
\begin{align}
w^T x_i + b \geqslant 1-\xi_i \text{ if } y_i=1, \nonumber \\
w^T x_i + b \leqslant -1+\xi_i \text{ if } y_i=-1,
\end{align}
The numbering will appear next to the second equation. But it would be better if it appears between the lines of the two equations.
In this case how to label this group of equations for later referring to?
Thanks and regards!
I'm using Eclipse/Spring source to edit JSP tags and EL. If I want to check what all the properties of a variable are is there a way to do this? Or even find out which file is generating the variable that's passed in. I'm thinking something along the lines of firebug for Javascript, where you can select an object and drill-down to get it's properties.
I developed an EAR using Quartz API. I have put my quartz.properties file in the classpath(WEB-INF/classes in war). Added following lines to web.xml file
<context-param>
<param-name>config-file</param-name>
<param-value>/WEB-INF/classes/quartz.properties</param-value>
</context-param>
But Quartz still loads the default properties file from the quartz.jar
I don't know python and I'm porting a library to C#, I've encountered the following lines of code that is used in some I/O operation but I'm not sure what it is, my guess is that it's a hexadecimal but I don't know why it's inside a string, neither what the backslashes do?
sep1 = '\x04H\xfe\x13' # record separator
sep2 = '\x00\xdd\x01\x0fT\x02\x00\x00\x01' # record separator
my apologies in advance for a python and json nubie question. json seems to be hiccuping on the following statements:
{"delete":{"status":{"id":12600579001,"user_id":55389449}}}
code snippet:
temp = json.loads(line)
text = temp['text']
I get the following error output when the above code snippet encounters lines similar to the above json 'dictionary':
text = temp['text']
KeyError: 'text'
Is it because there is no "text" key in the line or because "delete" is not in the dictionary?
Hi,
I have a method in my VBA code that needs to be assigned to a workbook
How can I assign this method to the worksheet.OnActivate event using VBA code?
I tried:
sht.Onactivate = "Sheet_Activate"
But this doesn't work and I need something on these lines.
Thanks.
Hi everyone,
I'm wondering what's good out there for AOP / crosscutting in .Net, along the lines of AspectJ. I see Microsoft has a policy injection application block; any other good stuff out there I should take a look at?
I can get the currentWindow doing this:
var win = Titanium.UI.currentWindow;
I can add a view:
win.add(myView);
But how can I retrieve this view? I'm looking for something in the lines of:
win.currentView;
// or
win.views[0];
Is this possible?
Eclipse's "find in project" took is, as far as I can tell, blindingly stupid.
Let me illustrate. This is what I get when I run a "find in project":
And when I click to see what's in that "closed" skinning folder I get…
... and so on.
So, is there any way to make this more helpful? Something along the lines of, say, ack, the tool I normally use?
I need to read binary PGM image files. Its format:
P5
# comments
nrows ncolumns
max-value
binary values start at this line. (totally nrows*ncolumns bytes/unsigned char)
I know how to do it in C or C++ using FILE handler by reading several lines first and read the binary block. But don't know how to do it in .Net.
I need to search for lines in a CSV file that end in an unterminated, double-quoted string.
For example:
1,2,a,b,"dog","rabbit
would match whereas
1,2,a,b,"dog","rabbit","cat bird"
1,2,a,b,"dog",rabbit
would not.
I have very limited experience with regular expressions, and the only thing I could think of is something like
"[^"]*$
However, that matches the last quote to the end of the line.
How would this be done?
Hi,
Environment is:
Windows Server 2008 R2 x64
Slik-Subversion-1.6.11-x64
TortoiseSVN-1.6.8.19260-x64-svn-1.6.11
I have setted up svn srvice based on Jeff Atwood guidlines and can connect work with host via svn command lines like svn list svn://localhost, but TortoiseSVN can't connect to it even on server machine itself. All firewall types are off. TortoiseSVN error message is:
Can't connect to host 'localhost': No connection could be made because the target machine actively refused it.
How can I solve this problem?
Thanks in Advance,
can somebody explain me what does this error mean:
> ./rank lines.in
'nknown option: `-
Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
this is my script rank:
#! /bin/tcsh -f
set line = `cat ${1}`
echo $line
I think that the problem I have is with first row #! /bin/tcsh -f
I'm working on Windows! but after I wrote script on windows editor, I converted it using dos2unix rank, what can be the problem, thanks in advance for any help
I am getting the following failure message when i build on the below two lines
http://www.freeimagehosting.net/][img]http://www.freeimagehosting.net/uploads/eb92ef98ac.jpg
Exceptions = message.Substring(trav + 1, expdiff - 1);
ExceptionList.Add(Exceptions);
It's really interesting how book reading applications like Stanza or Eucalyptus split epubs which is html by page so lines are clear and next page starts at the correct line.
Does anyone has any idea how this could be accomplished?
Does anyone know of a good (efficient, nice API, etc.) geometry open source library for .NET? Some of the operations needed:
Data Structures
Vectors (2D and 3D with floats and doubles)
Lines (2D and 3D)
Rectangles / Squares / Cubes / Boxes
Spheres / Circles
N-Sided Polygon
Matrices (floats and doubles)
Algorithms
Intersection calculations
Area / Volume calculations
Hi
I have written a pgsql function along the lines of what's shown below. How can I get rid of the $1, $2, etc. and replace them with the real argument names to make the function code more readable?
Regards
Peter
CREATE OR REPLACE FUNCTION InsertUser (
UserID UUID,
FirstName CHAR(10),
Surname VARCHAR(75),
Email VARCHAR(75)
)
RETURNS void
AS
$$
INSERT INTO "User" (userid,firstname,surname,email)
VALUES ($1,$2,$3,$4)
$$
LANGUAGE SQL;