Displaying 12 results from an estimated 12 matches for "total_count".
2019 Nov 20
2
[Clang] memory allocation
...ng information */
static int solutions[] = {
1,
0,
0,
2,
10, /* 5 */
4,
40,
92,
352,
724, /* 10 */
2680,
14200,
73712,
365596,
};
#define MAX_SOLUTIONS sizeof(solutions)/sizeof(int)
int total_count;
int sharedVar = 0;
int ok(int n, char *a)
{
int i, j;
char p, q;
printf("jjjjjjjjj: %d, %p\n", n,&j);
for (i = 0; i < n; i++) {
p = a[i];
for (j = i + 1; j < n; j++) {
q = a[j];
if (q == p || q == p - (j - i) || q == p + (j - i))...
2005 Aug 23
10
Creating a simple sum (or: I suck at blocks!)
I''ve been hacking on this for awhile and am not even getting close.
Consider the following...
results = Sample.find(:all)
total_counter = results.each{|result| #Add together result.counter}
I just want to simply iterate through the list and sum the counter field
for each row into an aggregation. I could do it in a full for loop, but
is there a nice one liner I''m missing?
Thanks,
Jeff
2008 Mar 19
2
problem with worker status
...ike this:
class UploadWorker < BackgrounDRb::MetaWorker
set_worker_name :upload_worker
set_no_auto_load(true)
def create(args = nil )
file = args[:file]
sample_id = args[:sample_id]
@user_id = args[:user_id]
@submission_time = Time.now
percent_complete = 0
total_count = get_total_count(file)
register_status(:percent_complete => percent_complete, :total =>
total_count)
<<< some long running task >>>
exit
end
end
Now when I fire up the backroundrb server and a rails console
and ask for a new worker like this:
>> jk = Midd...
2019 Nov 26
2
[Clang] memory allocation
...t; 4,
>> 40,
>> 92,
>> 352,
>> 724, /* 10 */
>> 2680,
>> 14200,
>> 73712,
>> 365596,
>> };
>> #define MAX_SOLUTIONS sizeof(solutions)/sizeof(int)
>>
>> int total_count;
>> int sharedVar = 0;
>>
>> int ok(int n, char *a)
>> {
>> int i, j;
>> char p, q;
>> printf("jjjjjjjjj: %d, %p\n", n,&j);
>> for (i = 0; i < n; i++) {
>> p = a[i];
>>
>>
>> for...
2010 Apr 28
1
[PATCH] RFC: Running initscripts from kinit
...ser)
return path;
}
+static int sort_compare(const void *a, const void *b)
+{
+ return strcmp(a, b);
+}
+
+/* Go through and run all scripts found in /etc/init.d */
+static void do_runscripts()
+{
+ DIR *dir;
+ struct dirent *dirent;
+ char **names = NULL;
+ unsigned used_count = 0;
+ unsigned total_count = 0;
+ char buf[256 + strlen(INITD) + 1];
+ int i;
+
+ dir = opendir(INITD);
+ if (!dir)
+ return;
+
+ while (1) {
+ dirent = readdir(dir);
+ if (dirent == NULL && errno != 0) {
+ perror("Failed to read initscript directory");
+ goto out;
+ } else if (dirent == NULL)
+ b...
2006 Apr 14
0
Quota again
...oot->message_bytes_limit / 1024;
- *value_r = root->total_bytes / 1024;
+ *value_r = root->total_bytes / 10;
} else if (strcmp(name, QUOTA_NAME_MESSAGES) == 0) {
*limit_r = root->message_count_limit;
*value_r = root->total_count;
2006 Apr 21
0
Bug: quota-maildir.c, array accessed out of bounds
...e == sizeof(buf)-1) {
/* error / recalculation needed. */
(void)close(fd);
t_pop();
return ret < 0 ? -1 : 0;
}
/* file is smaller than 5120 bytes, which means we can use it */
root->total_bytes = root->total_count = 0;
/* skip the last line if there's no LF at the end */
while (size > 0 && buf[size-1] != '\n') size--;
buf[size] = '\0';
2003 Dec 18
1
Samba 3.0.0: Problems with printing from win98 client
...2174)
get_stored_queue_info: changed job = 2022
... (a lot of the same lines)
[2003/12/18 14:43:02, 5] printing/printing.c:get_stored_queue_info(2174)
get_stored_queue_info: changed job = 2759
[2003/12/18 14:43:02, 5] printing/printing.c:get_stored_queue_info(2198)
get_stored_queue_info: total_count = 628
[2003/12/18 14:43:02, 4] smbd/lanman.c:api_DosPrintQGetInfo(814)
printqgetinfo: errorcode 0
[2003/12/18 14:43:02, 3] smbd/lanman.c:api_TooSmall(3433)
Supplied buffer too small in API command
I hope anyone can help with this problem
Thanks in advance
Oscar
2020 Feb 07
2
Dovecot/doveadm quota
.../
p += 3;
for (num = 0; *p >= '0' && *p <= '9'; p++)
@@ -104,7 +104,7 @@
str_truncate(path, len);
str_append(path, dp->d_name);
if (stat(str_c(path), &st) == 0) {
- *total_bytes += st.st_size;
+ *total_bytes += st.st_blocks * 512;
*total_count += 1;
} else if (errno != ENOENT && errno != ESTALE) {
*error_r = t_strdup_printf(
Thank you!
--
Best regards,
Martynas Bendorius
2020 Jan 06
4
Upgrade 2.2.27 to 2.3.9.2: master(imap): net_connect_unix(imap) failed: Resource temporarily unavailable
...arnings being logged with regards
to the process_limit.
~# doveadm who -1 | wc -l
8765
~# doveadm process status | grep "^imap " | wc -l
7583
~# ps aux | grep "dovecot/imap" | wc -l
7449
~# doveadm process status | grep -v "^imap "
name pid available_count total_count idle_start
last_status_update last_kill_sent
stats 19875 12384 582387 0 1578305489
0
pop3-login 19868 1000 0 0 1578061504
0
pop3-login 19867 1000 0 0 1578061503
0
pop3-login 19866 1000 0...
2020 Jan 07
0
Upgrade 2.2.27 to 2.3.9.2: master(imap): net_connect_unix(imap) failed: Resource temporarily unavailable
...;
> ~# doveadm who -1 | wc -l
> 8765
>
> ~# doveadm process status | grep "^imap " | wc -l
> 7583
>
> ~# ps aux | grep "dovecot/imap" | wc -l
> 7449
>
> ~# doveadm process status | grep -v "^imap "
> name?????? pid?? available_count total_count idle_start
> last_status_update last_kill_sent
> stats????? 19875 12384?????????? 582387????? 0????????? 1578305489 ? 0
> pop3-login 19868 1000??????????? 0?????????? 0????????? 1578061504 ? 0
> pop3-login 19867 1000??????????? 0?????????? 0????????? 1578061503 ? 0
> pop3-login 1986...
2020 Jan 14
0
Upgrade 2.2.27 to 2.3.9.2: master(imap): net_connect_unix(imap) failed: Resource temporarily unavailable
...;
> ~# doveadm who -1 | wc -l
> 8765
>
> ~# doveadm process status | grep "^imap " | wc -l
> 7583
>
> ~# ps aux | grep "dovecot/imap" | wc -l
> 7449
>
> ~# doveadm process status | grep -v "^imap "
> name?????? pid?? available_count total_count idle_start
> last_status_update last_kill_sent
> stats????? 19875 12384?????????? 582387????? 0????????? 1578305489 ? 0
> pop3-login 19868 1000??????????? 0?????????? 0????????? 1578061504 ? 0
> pop3-login 19867 1000??????????? 0?????????? 0????????? 1578061503 ? 0
> pop3-login 1986...