Is there a way to count the number of lines of code in an eclipse project? I can see the total number of lines for each file, but I'd like to see how much is generated across the whole project.
Do you have fond memories of the 'Help -> About This Record' functionality that used to be available in the old Customer form - when it was a form, and not a java html screen? Back in Release 11i, we had the ability to identify when the customer record had last been updated and by whom. When some forms were replaced by Java HTML screens, you could identify some of this information via the 'About this Page' hyperlink at the bottom left hand corner of the HTML page. You could enable this by enabling the FND: Diagnostics profile option, but many customers found this had an adverse effect on performance and additionally was not user-friendly.
Our customers tell us that this feature was widely used to identify owner/update information in many business processes, including auditing, customer entry/update, research and testing. There have been various efforts to revert this feature by customising java pages, but this was not fully successful in some cases.
Oracle Support is happy to announce that this functionality has now been included in the Customer screens in Release 12.2 onwards.
You will be able to query the record history at customer level, at site level, at site address levels and for all tabs relating to the customer.
Simply click on the 'Record History' icon, available in the Record History column on a summary screen, or via the same icon on the individual detail screen to display the following information:
Last Updated Date:
Last Updated By
Creation Date
Created By
Last Update Login
I have been trying to do some work in excel, but i seem to be stuck on one point
in colum "A" i have: a, b, c, d, e
in colum "B" i have: done, started, completed
in colum "C" to colum "S" i have: some "X"'s but not in all fields.
So my question is how do i do the following
foreach row in excel.A
Where Bx is done
count("X", $row)
I have tried pivot, countif, sumproduct but i cant seem to get it to work, any ideas?
I have a large Exchange server with many hundreds of thousands of emails in thousands of folders.
I would like to generate a list of how many emails have been sent, by user, for a subset of the public folders.
If I could run SQL against the server (can I?), I would like to run a query along the lines of:
SELECT from, count(*)
FROM emails
WHERE email_is_in_folder_or_descendents('Public Folders/Customers/XYZ')
GROUP BY from
Is this possible?
I have full administrator access to the server.
Hi Folks,
I am beginner to scripting and vigorously learning TCL for the development of embedded system.
I have to Search for the files with only .txt format in the current directory, count the number of cases of each different "Interface # nnnn" string in .txt file, where nnnn is a four or 32 digits max hexadecimal no and o/p of a table of Interface number against occurrence. I am facing implementation issues while writing a script i.e, Unable to implement the data structure like Linked List, Two Dimensional array.
I am rewriting a script using multi dimension array (Pass values into the arrays in and out of procedure) in TCL to scan through the every .txt file and search for the the string/regular expression ‘Interface # ’ to count and display the number of occurrences. If someone could help me to complete this part will be much appreciated.
Search for only .txt extension files and obtain the size of the file
Here is my piece of code for searching a .txt file in present directory
set files [glob *.txt]
if { [llength $files] > 0 } {
puts "Files:"
foreach f [lsort $files] {
puts " [file size $f] - $f"
}
} else {
puts "(no files)"
}
I reckon these are all the possible logical steps behind to complete it
i) Once searched and find the .txt file then open all .txt files in read only mode
ii) Create a array or list using the procedure (proc) Interface number to NULL and Interface count to zero 0
iii) Scan thro the .txt file and search for the string or regular expression "interface #
iv) When a match found in .txt file, check the Interface Number and increment the count for the corresponding entry. Else add new element to the Interface Number list
v) If there are no files return to the first directory
My o/p is like follows
Interface Frequency
123f 3
1232
4
I tested this code in Chrome and there seems to be a bug involving the newlines. I am reaching the maxlength before I actually use all the characters.
<textarea id="myText" maxlength="200" style="width:70%;height:200px">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s...
Enter something:
</textarea>
<div>
Char Count <span id="count"></span>/<span id="max"></span>
</div>?
<script>
var ta = document.getElementById('myText');
document.getElementById('max').innerHTML = ta.maxLength;
setInterval(function() {
document.getElementById('count').innerHTML = ta.value.length;
}, 250);?
</script>
How can I accurately get the char count of a textarea?
jsFiddle demo: http://jsfiddle.net/Qw6vz/1/
Hi,
We're using Crystal Reports.NET that was bundled with VS2005. We have a confirmation booking form letter report that we want to batch print. Generally this prints one page per person on letterhead paper, however occasionally if they've booked lots of courses the letter rolls over to two pages. The second page should not be printed to letterhead paper.
Basically, because it's a rare occurance I was just going to print the lot and pause if a particular letter went over 1 page. I.e. Load the report, grab the page count, hollah at the user if it's more than one page otherwise carry on regardless.
I have dropped a TotalPageCount on the footer of my report (Which I would supress if it worked!) and then try and read it in my application.
Once I've loaded the document I am trying to call
report.ReportDefinition.ReportObjects("TotalPageCount1")
Which is of type CrystalDecisions.CrystalReports.Engine.FieldObject
I cannot seem to get the value out of this for love nor money (nor any amount of cursing and swearing!)
I can read any items of type TextObject, but if I append the TotalPageCount to a text field, it shows correctly in the report but then returns "Page count: TotalPageCount" rather than "Page count: 1" for example.
Soo, short of going out of my mind, does anyone have any suggestions? Either a way to read the value or a way round it. The printer doesn't have multiple trays, though even if we got one, I'm not sure how to convince crystal to print different pages to different trays.
Best regards,
Stuart
P.S. - is it a sign that the "crystal-reports" tag has a count of 666? :O(
I have to get certain count from files. The grep statement i am using is like this :
counter_pstn=0
completed_count_pstn=0
rec=0
for rec in `(grep "merged" update_completed*.log | awk '{print $1}' | sed 's/ //g' | cut -d':' -f2)`
do
if [ $counter_pstn -eq 0 ]
then
completed_count_pstn=$rec
else
completed_count_pstn=$(($completed_count_pstn+$rec))
fi
counter_pstn=$(($counter_pstn+1))
done
echo "Completed Orders PSTN Primary " $completed_count_pstn
But the log file contains data in this format :
2500 rows merged.
2500 rows merged.
2500 rows merged.
2500 rows merged.2500 rows merged.
2500 rows merged.
2500 rows merged.
As a result , it is missing out the count of one merge(eg on line 4 of output).How do i modify the grep or use another function to get the count. NOTE that the 2500 number maybe for different logs. So we have to use "rows merged" pattern to get the count. i have tried -o ,-w grep options,but it is not working.
Expected output from above data:
17500
Actual output showing :
15000
I have two tables:
**Product**
ID
Name
SKU
**Brand**
ID
Name
Product table has about 120K records
Brand table has 30K records
I need to find count of all the products with name and brand matching a specific keyword.
I use freetext 'contains' like this:
SELECT count(*)
FROM Product
inner join Brand
on Product.BrandID = Brand.ID
WHERE (contains(Product.Name, 'pants')
or
contains(Brand.Name, 'pants'))
This query takes about 17 secs.
I rebuilt the FreeText index before running this query.
If I only check for Product.Name. They query is less then 1 sec. Same, if I only check the Brand.Name. The issue occurs if I use OR condition.
If I switch query to use LIKE:
SELECT count(*)
FROM Product
inner join Brand
on Product.BrandID = Brand.ID
WHERE Product.Name LIKE '%pants%'
or
Brand.Name LIKE '%pants%'
It takes 1 secs.
I read on MSDN that: http://msdn.microsoft.com/en-us/library/ms187787.aspx
To search on multiple tables, use a
joined table in your FROM clause to
search on a result set that is the
product of two or more tables.
So I added an INNER JOINED table to FROM:
SELECT count(*)
FROM (select Product.Name ProductName, Product.SKU ProductSKU, Brand.Name as BrandName FROM Product
inner join Brand
on product.BrandID = Brand.ID) as TempTable
WHERE
contains(TempTable.ProductName, 'pants')
or
contains(TempTable.BrandName, 'pants')
This results in error:
Cannot use a CONTAINS or FREETEXT predicate on column 'ProductName' because it is not full-text indexed.
So the question is - why OR condition could be causing such as slow query?
Hello, I am trying to get my query to grab multiple rows while returning the maximum count of that query.
My query:
SELECT *, COUNT(*) as Max FROM tableA LIMIT 0 , 30
However, it is only outputting 1 record.
I would like to return multiple record as it was the following query:
SELECT * FROM tableA LIMIT 0 , 30
Do I have to use separate queries?
Hi
I downloaded the active record library. I dont want to install it as gem in the system. I want to use that by requiring the lib like 'require "active_record"'
How to include the path of the source code of active record. So that I can make my program to execute.
I'm hoping someone out there can back me up on this...
I've been working on an application that allows the end user to record a small audio file for later playback and am in the process of testing for memory leaks. I continue to very consistently run into a memory leak when the AVAudioRecorder's "stop" method attempts to close the audio file to which it's been recording. This really seems to be a leak in the framework itself, but if I'm being a bonehead you can tell me.
To illustrate, I've worked up a stripped down test app that does nothing but start/stop a recording w/ the press of a button. For the sake of simplicty, everything happens in app. delegate as follows:
@synthesize audioRecorder, button;
@synthesize window;
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// create compplete path to database
NSString *tempPath = NSTemporaryDirectory();
NSString *audioFilePath = [tempPath stringByAppendingString:@"/customStatement.caf"];
// define audio file url
NSURL *audioFileURL = [[NSURL alloc] initFileURLWithPath:audioFilePath];
// define audio recorder settings
NSDictionary *settings = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kAudioFormatAppleIMA4], AVFormatIDKey,
[NSNumber numberWithInt:1], AVNumberOfChannelsKey,
[NSNumber numberWithInt:AVAudioQualityLow], AVSampleRateConverterAudioQualityKey,
[NSNumber numberWithFloat:44100], AVSampleRateKey,
[NSNumber numberWithInt:8], AVLinearPCMBitDepthKey,
nil
];
// define audio recorder
audioRecorder = [[AVAudioRecorder alloc] initWithURL:audioFileURL settings:settings error:nil];
[audioRecorder setDelegate:self];
[audioRecorder setMeteringEnabled:YES];
[audioRecorder prepareToRecord];
// define record button
button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[button addTarget:self action:@selector(handleTouch_recordButton) forControlEvents:UIControlEventTouchUpInside];
[button setFrame:CGRectMake(110.0, 217.5, 100.0, 45.0)];
[button setTitle:@"Record" forState:UIControlStateNormal];
[button setTitle:@"Stop" forState:UIControlStateSelected];
// configure the main view controller
UIViewController *viewController = [[UIViewController alloc] init];
[viewController.view addSubview:button];
// add controllers to window
[window addSubview:viewController.view];
[window makeKeyAndVisible];
// release
[audioFileURL release];
[settings release];
[viewController release];
return YES;
}
- (void) handleTouch_recordButton {
if ( ![button isSelected] ) {
[button setSelected:YES];
[audioRecorder record];
} else {
[button setSelected:NO];
[audioRecorder stop];
}
}
- (void) dealloc {
[audioRecorder release];
[button release];
[window release];
[super dealloc];
}
The stack trace from Instruments that shows pretty clearly that the "closeFile" method in the AVFoundation code is leaking...something. You can see a screen shot of the Instruments session here: Developer Forums: AVAudioRecorder Memory Leak
Any thoughts would be greatly appreciated!
Is there a neat way to make the record/object count for a model appear on the main model list in the admin module?
I have found techniques for showing counts of related objects within sets in the list_display page (and I can see the total in the pagination section at the bottom of the same), but haven't come across a neat way to show the recordcount at the model list level.
I'm new to mocks and am deciding on a mock framework. The Moq home quotes
Currently, it's the only mocking
library that goes against the
generalized and somewhat unintuitive
(especially for novices) Record/Reply
approach from all other frameworks.
Can anyone explain simply what the Record/Replay approach is and how Moq differs? What are the pros and cons of each especially from the point of deciding a framework?
Thanks.
I'm using Ruby+Watir to request pages through Firefox.
I would like to record the headers and content of every http request made through the browser.
Would it be possible to configure a proxy solution to store this information, either in a file or pipe it straight into an application? Could I use something such as squid or nginx to record header/content information?
PS: Running Ubuntu x64.
I've been using CodeIgniter for some quite time, and I've been extremely happy with its Active Record stuff. It's great to query the database with it.
Recently I've started a new project and I can't use such a framework anymore.
Is there a simple PHP Active Record library that does its job and gets out of the way (similar to CodeIgniter's version)?
I have one table, which has three fields and data.
Name , Top , Total
cat , 1 , 10
dog , 2 , 7
cat , 3 , 20
horse , 4 , 4
cat , 5 , 10
dog , 6 , 9
I want to select the record which has highest value of Total for each Name, so my result should be like this:
Name , Top , Total
cat , 3 , 20
horse , 4 , 4
Dog , 6 , 9
I tried group by name order by total, but it give top most record of group by result. Can anyone guide me, please?
Hi there,
I have an excel spreadsheet that contains the primarky-key/id value for a record in a table in an access database.
I would like to export specific data from certain cells in the spreadsheet to certain fields in the corresponding record in the table.
Is this possible, any help would be greatly appreciated.
Many thanks
Noel
I want to insert a record into a sqlite table if its actually not inserted.
Let's say it has three fields pk, name, address
I want to INSERT new record with name if that name not added preveously.
Can we do with this in a single Query. Seems like its slightly different from SQL Queries sometimes.
Thanks you,
Tharindu Madushanka
Hello All,
I want to fetch game record of Dota map. what player won, loss, kills or death ? I am fetching value, using PGPVN server but this not fetching custom map war craft III game. I did more and more googling. what is the perfect way to fetch this Dota map record ????
thanks in advance.
I am looking to get a random record from a huge (100 million record) mongodb. What is the fastest and most efficient way to do so? The data is already there and there are no field in which I can generate a random number and obtain a random row. Any suggestions?
I'm running a query and then decrypting it in the controller. After it is decrypted I was putting the results into an array and sending that to the view. The problem is with this solution I need to rewrite all of my views to parse the arrays sent instead of the active record objects sent before.
Is there a way to turn the decrypted array back into an object that will work with existing active record code in the view?
Before
Controller:
$name = $this->Clients_model->getNameData('*','client_id='.$clid,'');
$data['name'] = $name;
$this->load->view('names/name_view',$data);
View:
if($name->num_rows()) > 0){
foreach($name->result() as $row){
echo $row->data;
[...]
Now
Controller:
$name = $this->Clients_model->getNameData('*','client_id='.$clid,'');
$nameArray= array();
foreach ($name->result() as $row){
$x = $row;
$keys = array('id','client_id');
$unenc = array();
foreach ($x as $key=>$value){
if(! in_array($key, $keys)){
$unenc[$key]=$this->encrypt->decode($value,$this->e_key);
}else{
$unenc[$key]=$value;
}
}
array_push($nameArray,$unenc);
}
//Creates an object with the data, but doesn't work with CI active record
//foreach ($nameArray as $akey => $aval) {
// $namea -> {$akey} = $aval;
//}
//return $data;
$data['name'] = $nameArray;
$this->load->view('names/name_view',$data);
View:
if(count($name) > 0){
foreach($name as $key=>$row){
echo $row['data'];
[...]
In the second (now) controller there is some commented out code that will make an object, but it doesn't behave as expected with active record. Is there a way to take the $nameArray() array and change it into an object that will work with existing view code (such as the code in the 'before:view' above)?
Thanks!
v=spf1 ip4:211.121.22.56 a mx a:server.hostname.com ~all
My understanding is it allows the following to send out emails:
ip4: 211.121.22.56
a: A record (where website is hosted)
mx: whatever the MX record says
a: this server name
And nothing other than the above 4 places
Am I correct?
Hi All,
I am writing an application that can record a 3GP video.
I have tried both MMAPI and Invoke API. But have following issues.
Using MMAPI:
1. When I record to stream, It records video in RIMM streaming format. when I try to play this video player gives error "Unsupported media format.".
2. When I record to a file. It will create a file of size 0.
Using Invoke API:
1. In MMS mode it does not allow to record a video more than 30 seconds.
2. In Normal mode size of the file is very large.
3. Once I invoke camera application I do not have any control on application.
Here is my source code:
_player = javax.microedition.media.Manager
.createPlayer("capture://video?encoding=video/3gpp&mode=mms");
// I have tried every encoding returns from System.getProperty("video.encodings") method
_player.realize();
_videoControl = (VideoControl) _player.getControl("VideoControl");
_recordControl = (RecordControl) _player.getControl("RecordControl");
_volumeControl = (VolumeControl) _player.getControl("VolumeControl");
String videoPath = System.getProperty("fileconn.dir.videos");
if (videoPath == null) {
videoPath = "file:///store/home/user/videos/";
}
_recordControl.setRecordLocation(videoPath + "RecordedVideo.3gp");
_player.addPlayerListener(this);
Field videoField = (Field) _videoControl.initDisplayMode(
VideoControl.USE_GUI_PRIMITIVE,
"net.rim.device.api.ui.Field");
_videoControl.setVisible(true);
add(videoField);
_player.start();
ON start menu item Selection:
try {
_recordControl.startRecord();
} catch (Exception e) {
_player.close();
showAlert(e.getClass() + " " + e.getMessage());
}
On stop menuItem selection:
try {
_recordControl.commit();
} catch (Exception e) {
_player.close();
showAlert(e.getClass() + " " + e.getMessage());
}
Please let me if I am doing something wrong.
Thanks,
Pankaj
Hey,
I want to imitate the webcam video record feature that yFrog has on it's site.
I know I need a flash media server or a red5 one, but I want to know what flash app do they use and what is available on the net to record videos using the users webcam.
Thanks