I'm using the Zemanta API, which accepts up to 8 KB of text per call. I'm extracting the text to send to Zemanta from Web pages using JavaScript, so I'm looking for a function that will truncate my text at exactly 8 KB.
Zemanta should do this truncation on its own (i.e., if you send it a larger string), but I need to shuttle this text a...
We have an ActiveMQ topic into which a Java program inserts messages, where a C# client retrieves them. This has been working fine for a long time, with most of our messages around 1 - 2K. Recently we had a message closer to 10K (9,910 bytes); we take the message, wrap it with some XML, and send it to the topic.
When the C# application ...
Can the SQL "truncate table" command be used within a transaction? I am creating an app and my table has a ton of records. I want to delete all the records, but if the app fails I was to rollback my transaction. Deleting each record takes a very long time. I'm wondering if I use truncate table, can I still rollback the transaction an...
I'm trying to shrink some databases down so that my developers can load them to their local machines. I've identified several tables that hold historical data (10+ years worth) that would dramatically reduce the overall database size (50% or more) if I remove records older than X days. The delete statement that I'm using is demonstrate...
I have a table in one database, call this db x. I have another database, call it y. I want to copy data from x.some_table to y.some_table. I don't want to do an exact copy of the table, because some columns don't make sense in database b. I use the following query:
INSERT INTO y.some_table (a_field) SELECT a_field FROM x.some_table;
a...
Hello. I'm a novice when it comes to SQL and PHP, and I'm trying to round an average price result and take off the extra zeroes that currently appear.
Currently my result turns up as: $3.005000
My code currently reads as follows:
$result = mysql_query("SELECT AVG(price) FROM milk WHERE price > 0 ");
$row = mysql_fetch_row ($result);
...
Hi,
I am trying to truncate some long text in C#, but I don't want my string to be cut off part way through a word. Does anyone have a function that I can use to truncate my string at the end of a word?
E.g:
"This was a long string..."
Not:
"This was a long st..."
Thanks,
Tim
...
How can I truncate all user table in oracle? I have problem with tables constraints.
...
I have values being cut off and would like to display the full values.
Sqlite3 -column -header locations.dbs "
select n.namelist, f.state, t.state
from names n
left join locations l on l.id = n.id
left join statenames f on f.st = l.st
left join statenames t on t.st = l.stto
where n.timing > 200601 and count(n.timing)<=15"
Which gives ...
I have a requirement to add serveral images to an asp:placeholder control on a webpage. The added images are displayed one after the other across the page. However if the browser is resized by the user and the width is less than the overall length of the added images then the placeholder should be truncated and 3 dots added to the end ...
Hello folks,
We have a table with a 150+million records. We need to clear/delete all rows. Delete operation would take forever due to it writing to the t-logs and we cannot change our recovery model for the whole DB. We have tested the truncate table option. What we realized that truncate deallocates pages from the table, and if I am...
As stated in problem 37 at Project Euler:
The number 3797 has an interesting property. Being prime itself, it is possible to continuously remove digits from left to right, and remain prime at each stage: 3797, 797, 97, and 7. Similarly we can work from right to left: 3797, 379, 37, and 3.
I already solved this problem (answer ends ...
I'm trying to build a blog app and the problem is when I use tag 'truncatewords_html' in my template to truncate posts longer than specified words, I need to link to complete post by some title like 'read more...' after truncation. So I should know that the post was truncated or not.
P.S.: Is this a pythonic way to solve the problem?
...
I have a database of items with XHTML content and I want to display the items with the HTML stripped off (done) and then truncate each item to a maximum length of 100 characters. If the string exceeds 100 characters, I cut it off and insert … (an ellipsis) at the end.
The problem is that my program doesn't understand HTML entitie...
Hopefully this is a new question, if not, please point me to the answer.
I am using jquery.truncate-2.3.js in a website. I am using the script to truncate/expand text in many stories, each in a div tag. The story text within the tags is coming from an RSS feed (using the RSSFeed ASP.NET server control), and dropped in like this:
...
Tried to get a bit more info on this, but figured I'd just ask.... I attempted to perform a table truncate on Oracle 10g with the drop storage, however the results aren't entirely what I was expecting.
Basically, the table in question had over 30 million records and over 3Gb allocated for it, but somehow the space allocated for it sti...
hello!
my project is to create a program that will test whether a number is prime or not. the code is ready. but when i enter a 19 digit prime for example, the code immediately outputs "composite". i'm quite sure it is because it treats the last few digits of the number as zeroes. is there a way to store more than 16 digits in scilab?
...
I'm trying to join an array of objects into a string that will ultimately be used to populate the detail label of a table cell. if the text is too long it will automatcally truncate and add an elipse at the end.
I want to avoid this by checking that the string is less than say 40 characters and adding an elipse in the middle instead.
...
Is there a jquery truncate plugin that doesn't have trouble with HTML in the content?
For instance this plugin does not handle HTML well:
http://www.reindel.com/truncate/
...
Hi,
I'm using IsloatedStorage in a Silverlight app to log information on the client, and I added a function to clear the log file... However I have had problems with the two approaches I tried:
Approach one: use
IsolatedStorageFile.DeleteFile("log.log");
Result: This fails and returns an "[IsolatedStorage_DeleteFile]" error (No othe...