Daily Archives

Articles indexed Wednesday May 12 2010

Page 29/121 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Scrool Bar - Help

    - by 3gwebtrain
    Hi, any one can help in this?, i want to make a scroll bar to scroll the li underneath a div. in which i made a ui, scroller, but client want the front and back arrow to adjust the slides. like regular scroll bar like browser. please visit ; http://ikeafamilylive.com/stories/60 and you will witness what i request. And please don't recommend me a plug-in, because i need to use this scroll bar across the site with several customization process. please give me the sample code / suggestion to make a scroll bar using jquery+css. with full functionality.

    Read the article

  • manually put files to android emulator sd card

    - by poeschlorn
    Hi guys, I'm just having trouble with getting my emulator SD card work... I created a new AVD device with a new SD card. So how to put data onto it? I found the "correct" file to be mountet on Deamon tools, but is currupt or simply not readable... It would be great if you have any idea :)

    Read the article

  • Why AutoResetEvent and ManualResetEvent does not support name in the constructor?

    - by Ikaso
    On .NET Framework 2.0 AutoResetEvent and ManualResetEvent inherit from EventWaitHandle. The EventWaitHandle class has 4 different constructors. 3 of the constructors support giving a name to the event. On the other hand both ManualResetEvent and AutoResetEvent do not support naming and provide a single constructor that receives the initialState. I can simply inherit from EventWaitHandle and write my own implementation of those classes that support all the constructor overloads, but I don't like to re-invent the wheel if I do not have to. My questions are: Is there a special problem in naming events? Do you have any idea why Microsoft did not support it? Do you have a proposal better than inheriting from the EventWaitHandle class and calling the appropriate constructor as in the following example? public class MyAutoResetEvent: EventWaitHandle { public MyAutoResetEvent(bool initialState) : base(initialState, EventResetMode.AutoReset) { } public MyAutoResetEvent(bool initialState, string name) : base(initialState, EventResetMode.AutoReset, name) { } public MyAutoResetEvent(bool initialState, string name, out bool createdNew) : base(initialState, EventResetMode.AutoReset, name, out createdNew) { } public MyAutoResetEvent(bool initialState, string name, out bool createdNew, EventWaitHandleSecurity eventSecurity) : base(initialState, EventResetMode.AutoReset, string.Empty, out createdNew, eventSecurity) { } }

    Read the article

  • Internet Explorer background-color hover problem

    - by danilo
    I have a strange Problem with table formating using IE 7. My table looks like this: In IE, when using border-collapse, the borders don't get displayed correctly. That's why I used this fix: .table-vmlist td { border-top: 1px solid black; } td.col-vm-status, tr.row-details td { border-left: 1px solid black; } td.col-vm-rdp, tr.row-details td { border-right: 1px solid black; } .table-vmlist { border-bottom: 1px solid black;} When hovering over the row, it gets highlighted with CSS: .table-vmlist tr.row-vm { background-color: #A4C3EF; } .table-vmlist tr.row-vm:hover { background-color: #91BAEF; } Now, in IE 7, when moving the mouse from the top to the bottom of the list, every row gets highlighted correctly and no problems happen. But if I move my mouse pointer from the bottom of the list to the top, every second row seems to loose the border. Can someone explain what the problem is, and how to solve it? This is my markup: <tr class="row-vm"> <td class="col-vm-status status-1"><img title="Host Down" alt="Down" src="/Technik/vm-management/img/hoststatus_1.png"></td> <td class="col-vm-name">V1-VM-1</td> <td class="col-vm-stati"> <img title="Ping" alt="Ping status" src="/Technik/vm-management/img/servicestatus_3.png"> <img title="CPU" alt="CPU status" src="/Technik/vm-management/img/servicestatus_3.png"> <img title="RAM" alt="RAM status" src="/Technik/vm-management/img/servicestatus_3.png"> <img title="C:\ Diskspace" alt="Disk space status" src="/Technik/vm-management/img/servicestatus_3.png"> </td> <td class="col-vm-owner">kus</td> <td class="col-vm-purpose">Citrix Testserver</td> <td class="col-vm-ip">-</td> <td class="col-vm-uptime">-</td> <td class="col-vm-rdp">&nbsp;</td> </tr> And the CSS: /* VM-Tabelle formatieren */ .table-vmlist { border-collapse: collapse; } .table-vmlist tr { border: 1px solid black; } .table-vmlist tr.row-header { border: none; } .table-vmlist tr.row-vm { background-color: #A4C3EF; } .table-vmlist tr.row-vm:hover { background-color: #91BAEF; } .table-vmlist th { text-align: left; } .table-vmlist td { } .table-vmlist th, table td { padding: 2px 0px; } /* Spaltenbreite der VM-Tabelle festlegen */ .table-vmlist #col-status { width: 25px; } .table-vmlist #col-stati { width: 90px; } .table-vmlist #col-owner { width: 90px; } .table-vmlist #col-ip { width: 100px; } .table-vmlist #col-uptime { width: 70px; } .table-vmlist #col-rdp { width: 25px; } .table-vmlist tr.row-details td { padding: 0px 10px; } /* Kein Rahmen um verlinkte Bilder */ a img { border-width: 0px; } /* Für Einschaltknopf Hand-Cursor anstatt normalen Pfeil anzeigen */ td.status-1 img { cursor: pointer; } img.ajax-loader { margin-left: 2px; } IE fix: .table-vmlist td { border-top: 1px solid black; } td.col-vm-status, tr.row-details td { border-left: 1px solid black; } td.col-vm-rdp, tr.row-details td { border-right: 1px solid black; } .table-vmlist { border-bottom: 1px solid black;}

    Read the article

  • Outlook like UI Standards

    - by Amit
    Hi All, Need your help. I am in dire need of UI standards like we have in outlook, the size of the window, mesage sizes, font size stuff and all. I am trying to make few Add-ins, but clinet needs me to follow the UI standards as of outlook, request you to please help me. Amit

    Read the article

  • Mobile news reader

    - by Sergej Andrejev
    I'm using C# and probably .Net compact framework. How should I design mobile news reader (RSS, Atom...). What are risks I should be aware before I start? What libraries are there to help me read and parse data and synchronize it when going from offline mode?

    Read the article

  • Bind to several class properties

    - by Polaris
    Hello developers. I have some class with properties firstName and lastName. I want bind TextBlock to concatanation of this two properties. I know that I can create third property that will be return concatanation of these properties. But I dont want to use this approach. Is it possible to Bind TextBlock to two properties. and also I dont want create composite userControl.

    Read the article

  • How to send from my Z88 to my PC

    - by Bevan
    I've got a Cambridge Z88 that I want to get working with my PC. Around 6 years ago - in 2004 - I made heavy use of my Z88 to do a whole bunch of writing on the train while commuting to and from work. The Z88 is solid state, lightweight and has a full size silent keyboard, so it works very well as a writing instrument. I still have the serial cable I soldered up back then and used successfully in 2004. It has these connections: Z88 9 pin ----- ------- 2 TxD ------> RxD 2 3 RxD <------ TxD 3 7 GND <-----> GND 5 4 RTS ------> CTS 8 5 CTS <-+ RTS 7 8 DCD <-+---- DTR 4 9 DTR ----+-> DCD 1 +-> DSR 6 Unfortunately, I haven't been able to find my notes from 2004 that describe how I got it to work back then. I've spent several hours trying to Google a result, but to no avail. I'm pretty sure the cable is fine - after all, it's what I used successfully six years ago, and I've checked it out with a multimeter - so I'm focusing on the PC end of things, which is where I'd like some assistance. Q1: In my recent attempts, I've been using both Hyperterminal (as built into Windows XP) and the command line (copy com2: con:), but with no success. What's a good (better!) serial communications application to use? Is there one that allows me to see as deep as the signalling that's occurring on the wire? Q2: If you have a Z88 that works correctly with your PC, what software do you use on the PC end, and what's the pinout of your cable? I'm pretty sure that the Z88 itself is working properly: When using the built in Import/Export tool to send a file, I see different behaviour when my serial cable is connected compared to disconnected. When disconnected, the transmission appears to work, with a progress meter counting up and then finishing; when connected, nothing happens 'cept a timeout if I wait long enough.

    Read the article

  • Is there a module for parsing numbers (inkl. ranges)?

    - by sid_com
    Is there a module, which does this for me? #!/usr/bin/env perl use warnings; use strict; use 5.012; sub aw_parse { my( $in, $max ) = @_; chomp $in; my @array = split ( /\s*,\s*/, $in ); my %zahlen; for ( @array ) { if ( /^\s*(\d+)\s*$/ ) { $zahlen{$1}++; } elsif ( /^\s*(\d+)\s*-\s*(\d+)\s*$/ ) { die "'$1-$2' not a valid input $!" if $1 >= $2; for ( $1 .. $2 ) { $zahlen{$_}++; } } else { die "'$_' not a valid input $!"; } } @array = sort { $a <=> $b } keys ( %zahlen ); if ( defined $max ) { for ( @array ) { die "Input '0' not allowed $!" if $_ == 0; die "Input ($_) greater than $max not allowed $!" if $_ > $max; } } return \@array; } my $max = 20; print "Input (max $max): "; my $in = <>; my $out = aw_parse( $in, $max ); say "@$out";

    Read the article

  • How to synchronize cuda threads when they are in the same loop and we need to synchronize them to ex

    - by Vickey
    Hi all, I have written a code and Now I want to implement this on cuda GPU but I'm new to synchronization so please help me with this, It's little urgent to me. Below I'm presenting the code and I want to that LOOP1 to be executed by all threads (heance I want to this portion to take advantage of cuda and the remaining portion (the portion other from the LOOP1) is to be executed by only a single thread. do{ point_set = master_Q[(*num_mas) - 1].q; List* temp = point_set; List* pa = point_set; if(master_Q[num_mas[0] - 1].max) max_level = (int) (ceilf(il2 * log(master_Q[num_mas[0] - 1].max))); *num_mas = (*num_mas) - 1; while(point_set){ List* insert_ele = temp; while(temp){ insert_ele = temp; if((insert_ele->dist[insert_ele->dist_index-1] <= pow(2, max_level-1)) || (top_level == max_level)){ if(point_set == temp){ point_set = temp->next; pa = temp->next; } else{ pa->next = temp->next; } temp = NULL; List* new_point_set = point_set; float maximum_dist = 0; if(parent->p_index != insert_ele->point_index){ List* tmp = new_point_set; float *b = &(data[(insert_ele->point_index)*point_len]); **LOOP 1:** while(tmp){ float *c = &(data[(tmp->point_index)*point_len]); float sum = 0.; for(int j = 0; j < point_len; j+=2){ float d1 = b[j] - c[j]; float d2 = b[j+1] - c[j+1]; d1 *= d1; d2 *= d2; sum = sum + d1 + d2; } tmp->dist[tmp->dist_index] = sqrt(sum); if(maximum_dist < tmp->dist[tmp->dist_index]) maximum_dist = tmp->dist[tmp->dist_index]; tmp->dist_index = tmp->dist_index+1; tmp = tmp->next; } max_distance = maximum_dist; } while(new_point_set || insert_ele){ List* far, *par, *tmp, *tmp_new; far = NULL; tmp = new_point_set; tmp_new = NULL; float level_dist = pow(2, max_level-1); float maxdist = 0, maxp = 0; while(tmp){ if(tmp->dist[(tmp->dist_index)-1] > level_dist){ if(maxdist < tmp->dist[tmp->dist_index-1]) maxdist = tmp->dist[tmp->dist_index-1]; if(tmp == new_point_set){ new_point_set = tmp->next; par = tmp->next; } else{ par->next = tmp->next; } if(far == NULL){ far = tmp; tmp_new = far; } else{ tmp_new->next = tmp; tmp_new = tmp; } if(parent->p_index != insert_ele->point_index) tmp->dist_index = tmp->dist_index - 1; tmp = tmp->next; tmp_new->next = NULL; } else{ par = tmp; if(maxp < tmp->dist[(tmp->dist_index)-1]) maxp = tmp->dist[(tmp->dist_index)-1]; tmp = tmp->next; } } if(0 == maxp){ tmp = new_point_set; aloc_mem[*tree_index].p_index = insert_ele->point_index; aloc_mem[*tree_index].no_child = 0; aloc_mem[*tree_index].level = max_level--; parent->children_index[parent->no_child++] = *tree_index; parent = &(aloc_mem[*tree_index]); tree_index[0] = tree_index[0]+1; while(tmp){ aloc_mem[*tree_index].p_index = tmp->point_index; aloc_mem[(*tree_index)].no_child = 0; aloc_mem[(*tree_index)].level = master_Q[(*cur_count_Q)-1].level; parent->children_index[parent->no_child] = *tree_index; parent->no_child = parent->no_child + 1; (*tree_index)++; tmp = tmp->next; } cur_count_Q[0] = cur_count_Q[0]-1; new_point_set = NULL; } master_Q[*num_mas].q = far; master_Q[*num_mas].parent = parent; master_Q[*num_mas].valid = true; master_Q[*num_mas].max = maxdist; master_Q[*num_mas].level = max_level; num_mas[0] = num_mas[0]+1; if(0 != maxp){ aloc_mem[*tree_index].p_index = insert_ele->point_index; aloc_mem[*tree_index].no_child = 0; aloc_mem[*tree_index].level = max_level; parent->children_index[parent->no_child++] = *tree_index; parent = &(aloc_mem[*tree_index]); tree_index[0] = tree_index[0]+1; if(maxp){ int new_level = ((int) (ceilf(il2 * log(maxp)))) +1; if (new_level < (max_level-1)) max_level = new_level; else max_level--; } else max_level--; } if( 0 == maxp ) insert_ele = NULL; } } else{ if(NULL == temp->next){ master_Q[*num_mas].q = point_set; master_Q[*num_mas].parent = parent; master_Q[*num_mas].valid = true; master_Q[*num_mas].level = max_level; num_mas[0] = num_mas[0]+1; } pa = temp; temp = temp->next; } } if((*num_mas) > 1){ List *temp2 = master_Q[(*num_mas)-1].q; while(temp2){ List* temp3 = master_Q[(*num_mas)-2].q; master_Q[(*num_mas)-2].q = temp2; if((master_Q[(*num_mas)-1].parent)->p_index != (master_Q[(*num_mas)-2].parent)->p_index){ temp2->dist_index = temp2->dist_index - 1; } temp2 = temp2->next; master_Q[(*num_mas)-2].q->next = temp3; } num_mas[0] = num_mas[0]-1; } point_set = master_Q[(*num_mas)-1].q; temp = point_set; pa = point_set; parent = master_Q[(*num_mas)-1].parent; max_level = master_Q[(*num_mas)-1].level; if(master_Q[(*num_mas)-1].max) if( max_level > ((int) (ceilf(il2 * log(master_Q[(*num_mas)-1].max)))) +1) max_level = ((int) (ceilf(il2 * log(master_Q[(*num_mas)-1].max)))) +1; num_mas[0] = num_mas[0]-1; } }while(*num_mas > 0);

    Read the article

  • Problem with fetching dictionary objects in array from plist iphone sdk

    - by neha
    Hi all, What is the datatype you use to fetch items whose type is dictionary in plist i.e. nsmutabledictionary or nsdictionary? Because I'm using following code to retrieve dictionary objects from an array of dictionaries in plist. NSMutableDictionary *_myDict = [contentArray objectAtIndex:0]; NSLog(@"MYDICT : %@",_myDict); NSString *myKey = (NSString *)[_myDict valueForKey:@"Contents"] ; [[cell lblFeed] setText:[NSString stringWithFormat:@"%@",myKey]]; Here, on first line it's showing me objc_msgsend. ContentArray is an nsarray and it's contents are showing 2 objects that are there in plist. In plist they are dictionary objects. Then why this error? Can anybody please help? Thanx in advance.

    Read the article

  • Java DAO caching

    - by santiagobasulto
    I'm developing a medium Java app, and i'm facing a small problem due to my lack of experience. I've a custom DAO, which gets "Article" objects from the Database. I've the Article class, and the DAO has a method called getArticle(int id), this method returns an Article. The Article has a Category object, and I'm using lazy loading. So, when I request for an article's category (Article a = new Article(); a.getCategory();) the Article class gets the Category from the DAO and then returns it. I'm now thinking to cache it, so when I request multiple times to an article's category, the database is only queried one time. My question is: where should I put that cache? I can put it on the Article class (in the DTO), or I can put it on the DAO class. What do you say?

    Read the article

  • Event based PROJECT MANAGEMENT

    - by andreas
    Hey fellas! Where i am working we have a number of contractor programmers. We handle the requirements and the project management of our products. I have been trying using various project timing and estimations techniques but cant get the hang of it yet. I have read Joel's evidence based scheduling and i was wondering if there's anything out there that can help me apply that theory? not looking for complex software but perhaps something in excel? Any help will be appreciated Andreas

    Read the article

  • How to static analyze C++ and Objective-C++ code?

    - by Plumenator
    The "Build and analyze" option doesn't seem to work for .cpp and .mm files. I tried "clang --analyze" on individual files without any standard #includes and it works well. However I'm not able to run it on my Xcode project. I couldn't figure out a way to make clang find the standard #includes like even UIKit.h. Any clues?

    Read the article

  • error LNK2019 for ZLib sample code compiling.

    - by Nano HE
    Hello. I created win32 console application in vs2010 (without select the option of precompiled header). And I inserted the code below. but *.obj link failed. Could you provide me more information about the error. I searched MSDN, but still can't understand it. #include <stdio.h> #include "zlib.h" // Demonstration of zlib utility functions unsigned long file_size(char *filename) { FILE *pFile = fopen(filename, "rb"); fseek (pFile, 0, SEEK_END); unsigned long size = ftell(pFile); fclose (pFile); return size; } int decompress_one_file(char *infilename, char *outfilename) { gzFile infile = gzopen(infilename, "rb"); FILE *outfile = fopen(outfilename, "wb"); if (!infile || !outfile) return -1; char buffer[128]; int num_read = 0; while ((num_read = gzread(infile, buffer, sizeof(buffer))) > 0) { fwrite(buffer, 1, num_read, outfile); } gzclose(infile); fclose(outfile); } int compress_one_file(char *infilename, char *outfilename) { FILE *infile = fopen(infilename, "rb"); gzFile outfile = gzopen(outfilename, "wb"); if (!infile || !outfile) return -1; char inbuffer[128]; int num_read = 0; unsigned long total_read = 0, total_wrote = 0; while ((num_read = fread(inbuffer, 1, sizeof(inbuffer), infile)) > 0) { total_read += num_read; gzwrite(outfile, inbuffer, num_read); } fclose(infile); gzclose(outfile); printf("Read %ld bytes, Wrote %ld bytes, Compression factor %4.2f%%\n", total_read, file_size(outfilename), (1.0-file_size(outfilename)*1.0/total_read)*100.0); } int main(int argc, char **argv) { compress_one_file(argv[1],argv[2]); decompress_one_file(argv[2],argv[3]);} Output: 1>------ Build started: Project: zlibApp, Configuration: Debug Win32 ------ 1> zlibApp.cpp 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(15): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen' 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(25): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen' 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(40): warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> c:\program files\microsoft visual studio 10.0\vc\include\stdio.h(234) : see declaration of 'fopen' 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(36): warning C4715: 'decompress_one_file' : not all control paths return a value 1>d:\learning\cpp\cppvs2010\zlibapp\zlibapp\zlibapp.cpp(57): warning C4715: 'compress_one_file' : not all control paths return a value 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzclose referenced in function "int __cdecl decompress_one_file(char *,char *)" (?decompress_one_file@@YAHPAD0@Z) 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzread referenced in function "int __cdecl decompress_one_file(char *,char *)" (?decompress_one_file@@YAHPAD0@Z) 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzopen referenced in function "int __cdecl decompress_one_file(char *,char *)" (?decompress_one_file@@YAHPAD0@Z) 1>zlibApp.obj : error LNK2019: unresolved external symbol _gzwrite referenced in function "int __cdecl compress_one_file(char *,char *)" (?compress_one_file@@YAHPAD0@Z) 1>D:\learning\cpp\cppVS2010\zlibApp\Debug\zlibApp.exe : fatal error LNK1120: 4 unresolved externals ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Read the article

  • Can a member struct be zero-init from the constructor initializer list without calling memset?

    - by selbie
    Let's say I have the following structure declaration (simple struct with no constructor). struct Foo { int x; int y; int z; char szData[DATA_SIZE]; }; Now let's say this struct is a member of a C++ class as follows: class CFoobar { Foo _foo; public: CFoobar(); }; If I declare CFoobar's constructor as follows: CFoobar::CFoobar() { printf("_foo = {%d, %d, %d}\n", _foo.x, _foo.y,_foo.z); for (int x = 0; x < 100; x++) printf("%d\n", _foo.szData[x]); } As you would expect, when CFoobar's constructor runs, garbage data gets printed out Obviously, the easy fix is to memset or ZeroMemory &_foo. It's what I've always done... However, I did notice that if add _foo to the constructor's initialization list with no parameters as follows: CFoobar::CFoobar() : _foo() { That this appears to zero-out the member variables of _foo. At least that was the case with g++ on linux. Now here's my question: Is this standard C++, or is this compiler specific behavior? If it's standard behavior, can someone quote me a reference from an official source? Any "gotchas" in regards to implicit zero-init behavior with more complicated structs and classes?

    Read the article

  • Initializing an array after declaration

    - by robUK
    Hello, gcc 4.4.3 c89 I have the following code as a sample of what I am trying to do. I don't know the actual size of the array, until I enter the function. However, I don't think I can set the array size after I have declared it. I need it global as some other functions will need to access the device names. Many thanks for any suggestions, /* global */ char *devices_names[]; void fill_devices(size_t num_devices) { devices_names[num_devices]; /* start filling */ }

    Read the article

  • Marquee in various TextView at the same time?

    - by YaW
    Hi, I have a dinamic layout wich has one to six TextViews. All the TextViews are created in the Activity (programatically) and all are created equally. I want to marquee the text in the TextViews, but I don't know how to do it. Apparently, the TextView needs to be focused for the marquee works fine, but how i focus six TextViews at the same time? I think that's not possible, so, is there any workaround? Is it possible to get the marquee working without having the focus? This is the code of the TextViews: //TextView TextView tvTitulo = new TextView(this); tvTitulo.setText("Some loooooooooooooooooooooong text"); tvTitulo.setTypeface(null, Typeface.BOLD); //Marquee tvTitulo.setSingleLine(); tvTitulo.setEllipsize(TruncateAt.MARQUEE); tvTitulo.setHorizontallyScrolling(true); tvTitulo.setFocusableInTouchMode(true); If I remove the line tvTitulo.setFocusableInTouchMode(true); the marquee is not working at all. If I don't remove the line, only one of the TextViews is getting the marquee working. Greetings

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >