Daily Archives

Articles indexed Friday April 2 2010

Page 25/105 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Unmanaged C++ in .net

    - by _Avishay_
    Hi, can someone please tell why , Great Microsoft that created C# language and now we're in C# 4.0 , dont have an important feature that C++\CLI has !!,which is to directly compile and link with un-managed c++ ??

    Read the article

  • Android custom ListView unable to click on items

    - by MattC
    So I have a custom ListView object. The list items have two textviews stacked on top of each other, plus a horizontal progress bar that I want to remain hidden until I actually do something. To the far right is a checkbox that I only want to display when the user needs to download updates to their database(s). When I disable the checkbox by setting the visibility to Visibility.GONE, I am able to click on the list items. When the checkbox is visible, I am unable to click on anything in the list except the checkboxes. I've done some searching but haven't found anything relevant to my current situation. I found this question but I'm using an overridden ArrayAdapter since I'm using ArrayLists to contain the list of databases internally. Do I just need to get the LinearLayout view and add an onClickListener like Tom did? I'm not sure. Here's the listview row layout XML: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="?android:attr/listPreferredItemHeight" android:padding="6dip"> <LinearLayout android:orientation="vertical" android:layout_width="0dip" android:layout_weight="1" android:layout_height="fill_parent"> <TextView android:id="@+id/UpdateNameText" android:layout_width="wrap_content" android:layout_height="0dip" android:layout_weight="1" android:textSize="18sp" android:gravity="center_vertical" /> <TextView android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="1" android:id="@+id/UpdateStatusText" android:singleLine="true" android:ellipsize="marquee" /> <ProgressBar android:id="@+id/UpdateProgress" android:layout_width="fill_parent" android:layout_height="wrap_content" android:indeterminateOnly="false" android:progressDrawable="@android:drawable/progress_horizontal" android:indeterminateDrawable="@android:drawable/progress_indeterminate_horizontal" android:minHeight="10dip" android:maxHeight="10dip" /> </LinearLayout> <CheckBox android:text="" android:id="@+id/UpdateCheckBox" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> And here's the class that extends the ListActivity. Obviously it's still in development so forgive the things that are missing or might be left laying around: import java.util.List; import android.app.ListActivity; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.CheckBox; import android.widget.ListView; import android.widget.ProgressBar; import android.widget.TextView; import com.xxxx.android.R; import com.xxxx.android.DAO.AccountManager; import com.xxxx.android.model.UpdateItem; public class UpdateActivity extends ListActivity { AccountManager lookupDb; boolean allSelected; UpdateListAdapter list; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); lookupDb = new AccountManager(this); lookupDb.loadUpdates(); setContentView(R.layout.update); allSelected = false; list = new UpdateListAdapter(this, R.layout.update_row, lookupDb.getUpdateItems()); setListAdapter(list);

    Read the article

  • Intersection of line with cube and knowing the point of intersection.

    - by Raj
    Hello everyone, description 1.lines are originating from origin(0,0,0). 2.lines are at some random angle to the Normal of Top face of teh cube. 3.if the lines are intersecting cube , calculate the intersection point. 4.mainly i wan to know how much distance ,line traveled inside the cube. I dont know exactly which approach should i take , i will be pleased and thankful if someone could guied me to the right direction, to use OpenGL, DirectX or some other library, for C# . some example or sample will be appriciated.

    Read the article

  • Windows Vista Update Now Wont Boot Up

    - by thatryan
    My friend just updated her Windows Vista to service pack 1, or tried to. Now it wont boot up. Just black screen, some errors etc. I tried googling it and lots of people had this problem it seems. Anyone find a fix for it? I read somewhere I believe that Microsoft said to delete some files, Nvidia maybe? But I can not find that again, I forgot the exact error code I searched for before. Does anyone know what I am talking about? LOL Thanks guys.

    Read the article

  • GhettoVCB.sh log is wrong

    - by Michael
    2010-02-25 16:03:02 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 2 2010-02-25 16:03:02 -- info: CONFIG - DISK_BACKUP_FORMAT = thin 2010-02-25 16:03:02 -- info: ============================== ghettoVCB LOG START ============================== 2010-02-25 16:03:02 -- info: CONFIG - ADAPTER_FORMAT = buslogic 2010-02-25 16:03:02 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0 2010-02-25 16:03:02 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0 2010-02-25 16:03:02 -- info: CONFIG - VM_BACKUP_VOLUME = /vmfs/volumes/nfs_storage_backup/vm1 2010-02-25 16:03:02 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3 2010-02-25 16:03:02 -- info: CONFIG - VM_BACKUP_ROTATION_COUNT = 2 2010-02-25 16:03:02 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5 2010-02-25 16:03:02 -- info: CONFIG - DISK_BACKUP_FORMAT = thin 2010-02-25 16:03:02 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15 2010-02-25 16:03:02 -- info: CONFIG - ADAPTER_FORMAT = buslogic 2010-02-25 16:03:02 -- info: CONFIG - LOG_LEVEL = info 2010-02-25 16:03:02 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB.log 2010-02-25 16:03:02 -- info: CONFIG - POWER_VM_DOWN_BEFORE_BACKUP = 0 2010-02-25 16:03:02 -- info: CONFIG - ENABLE_HARD_POWER_OFF = 0 2010-02-25 16:03:02 -- info: CONFIG - ITER_TO_WAIT_SHUTDOWN = 3 2010-02-25 16:03:02 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0 2010-02-25 16:03:02 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0 2010-02-25 16:03:02 -- info: CONFIG - POWER_DOWN_TIMEOUT = 5 2010-02-25 16:03:02 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all 2010-02-25 16:03:02 -- info: CONFIG - SNAPSHOT_TIMEOUT = 15 2010-02-25 16:03:02 -- info: CONFIG - LOG_LEVEL = info 2010-02-25 16:03:02 -- info: CONFIG - BACKUP_LOG_OUTPUT = /tmp/ghettoVCB.log 2010-02-25 16:03:02 -- info: CONFIG - VM_SNAPSHOT_MEMORY = 0 2010-02-25 16:03:02 -- info: CONFIG - VM_SNAPSHOT_QUIESCE = 0 2010-02-25 16:03:02 -- info: CONFIG - VMDK_FILES_TO_BACKUP = all 2010-02-25 16:03:13 -- info: Initiate backup for VM1 2010-02-25 16:03:13 -- info: Initiate backup for VM1 2010-02-25 16:03:13 -- info: Creating Snapshot "ghettoVCB-snapshot-2010-02-25" for VM1 2010-02-25 16:03:13 -- info: Creating Snapshot "ghettoVCB-snapshot-2010-02-25" for VM1 Failed to clone disk : The file already exists (39). Destination disk format: VMFS thin-provisioned Cloning disk '/vmfs/volumes/datastore1/machine/VM1.vmdk'... 2010-02-25 16:04:16 -- info: Removing snapshot from VM1 ... Destination disk format: VMFS thin-provisioned Cloning disk '/vmfs/volumes/datastore1/machine/VM1.vmdk'... How can I fix this issue, the backup is working, but the log shows something like 2 back-up's in the exact time?

    Read the article

  • C : crypt function

    - by kiruthika
    Hi all, I have used the crypt function in c to encrypt the given string. I have written the following code, #include<stdio.h> #include<unistd.h> int main() { printf("%s\n",crypt("passwd",1000)); } But the above code threw an error ,"undefined reference to `crypt'". What is the problem in the above code. Thanks in advance.

    Read the article

  • IO completion port key confusion

    - by Richard Tew
    I'm writing an IO completion port based server (source code here) using the Windows DLL API in Python using the ctypes module. But this is a pretty direct usage of the API and this question is directed at those who have a knowledge of IOCP, not Python. As I understand the documentation for CreateIoCompletionPort, you specify your "user defined" completion key when you call this function with a file handle (in my case a socket) you are associating with the created IOCP. When you get around to calling GetQueuedCompletionStatus, you get a completion key value along with a pointer to an overlapped object. The completion key should identify what overlapped object and request has completed. However, let's say I pass in 100 as the completion key in my CreateIoCompletionPort call with an overlapped object. When the same overlapped object has its IO completed and it arrives back through GetQueuedCompletionStatus, the completion key that accompanies it is much larger and bares no resemblance to the original value of 100. Am I misunderstanding how the completion key works, or must I be doing it wrong in the source code I linked above?

    Read the article

  • SDL_image/C++ OpenGL Program: IMG_Load() produces fuzzy images

    - by Kami
    I'm trying to load an image file and use it as a texture for a cube. I'm using SDL_image to do that. I used this image because I've found it in various file formats (tga, tif, jpg, png, bmp) The code : SDL_Surface * texture; //load an image to an SDL surface (i.e. a buffer) texture = IMG_Load("/Users/Foo/Code/xcode/test/lena.bmp"); if(texture == NULL){ printf("bad image\n"); exit(1); } //create an OpenGL texture object glGenTextures(1, &textureObjOpenGLlogo); //select the texture object you need glBindTexture(GL_TEXTURE_2D, textureObjOpenGLlogo); //define the parameters of that texture object //how the texture should wrap in s direction glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); //how the texture should wrap in t direction glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); //how the texture lookup should be interpolated when the face is smaller than the texture glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); //how the texture lookup should be interpolated when the face is bigger than the texture glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); //send the texture image to the graphic card glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, texture->w, texture->h, 0, GL_RGB, GL_UNSIGNED_BYTE, texture-> pixels); //clean the SDL surface SDL_FreeSurface(texture); The code compiles without errors or warnings ! I've tired all the files formats but this always produces that ugly result : I'm using : SDL_image 1.2.9 & SDL 1.2.14 with XCode 3.2 under 10.6.2 Does anyone knows how to fix this ?

    Read the article

  • Python In-memory table

    - by nsharish
    What is the right way to forming in-memory table in python with direct lookups for rows and columns.I thought of using dict of dicts this way, class Table(dict): def __getitem__(self, key): if key not in self: self[key]={} return dict.__getitem__(self, key) table = Table() table['row1']['column1'] = 'value11' table['row1']['column2'] = 'value12' table['row2']['column1'] = 'value21' table['row2']['column2'] = 'value22' >>>table {'row1':{'column1':'value11','column2':'value12'},'row2':{'column1':'value21','column2':'value22'}} I had difficulty in looking up for values in columns. >>>'row1' in table True >>>'value11' in table['row1'].values() True Now how do I do lookup if 'column1' has 'value11' Is this method of forming tables wrong?Is there a better way to implement such tables with easier lookups?.Thanks

    Read the article

  • exec problem in sql 2005

    - by IordanTanev
    Hi, i have the situation where i have two databases whith same structure. The first have some data in its datatables. I need to create a script that will transfer the data from the first database to the second. I have created this script. DECLARE @table_name nvarchar(MAX), @query nvarchar(MAX) DECLARE @table_cursor CURSOR SET @table_cursor = CURSOR FAST_FORWARD FOR Select TABLE_NAME FROM INFORMATION_SCHEMA.TABLES OPEN @table_cursor FETCH NEXT FROM @table_cursor INTO @table_name WHILE @@FETCH_STATUS = 0 BEGIN SET @query = 'INSERT INTO ' + @table_name + ' SELECT * FROM MyDataBase.dbo.' + @table_name print @query exec @query FETCH NEXT FROM @table_cursor INTO @table_name END CLOSE @table_cursor DEALLOCATE @table_cursor The problem is that when i run th script the "print @query" statement prints statement like this INSERT INTO table SELECT * FROM MyDataBase.dbo.table When i copy this and run it from Management studio it works fine. But when the script trys to run it with exec i get this error Msg 911, Level 16, State 1, Line 21 Could not locate entry in sysdatabases for database 'INSERT INTO table SELECT * FROM MPDEV090314'. No entry found with that name. Make sure that the name is entered correctly. Hope someone can tell me whot is wront with this. Best Regards, Iordan Tanev

    Read the article

  • Javascript OLE Word

    - by Martijn
    I want to show a MS Word environment in an Iframe without all the toobars. The document that is being showed contains input fields. After these fields are filled in, the document must be printed. I have created the print button and want the (filled in) document printed when this button is clicked. I hope you understand want I want and hope you can help out.

    Read the article

  • class/lib for parallel donwloads on iphone

    - by lope
    Hi there! I need some class or lib that would allow me to run multiple parallel downloads. I didn't have luck finding any, do you guys know about something useful? I need to add new files to download dynamically, so something that only get initialized with urls at the beginning won't help me much. Any help would be greatly appreciated. I tried to create my own, but I had some problems with it. So I figured I would try to get something that is already done.

    Read the article

  • Identify which AlertDialog triggered onClick(DialogInterface dialog, int which)

    - by Kurian
    I'm creating a dialog as follows: @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_1: return new AlertDialog.Builder(this) .setTitle(R.string.s_dlg1) .setPositiveButton(android.R.string.ok, this) .create(); case DIALOG_2: ... ... } return null; } @Override public void onClick(DialogInterface dialog, int whichButton) { if (dialog == ???) { ... } else if (dialog == ???){ ... } } How do I identify which dialog triggered the onClick method? I can't declare the interface methods as in-line when creating the dialog because I want to access variables in my class. Every other interface passes some sort of id to its methods to identify which object called the method, but I can't seem to do anything with 'DialogInterface dialog'.

    Read the article

  • InstallShield to WIX

    - by diddams
    I have an .msi that was created using InstallShield 2008. and now I need to use WIX to create a patch. Is this possible using Wix directly or do I need to convery my installshield .ism source to a Wix project

    Read the article

  • Getting RGB values for each pixel from a 24bpp Bitmap in C

    - by seven
    Hello, i want to read the RGB values for each pixel from a .bmp file , so i can convert the bmp into a format suitable for gba . so i need to get just the RGB for each pixel and then write this information to a file. i am trying to use the windows.h structures : typedef struct { char signature[2]; unsigned int fileSize; unsigned int reserved; unsigned int offset; }BmpHeader; typedef struct { unsigned int headerSize; unsigned int width; unsigned int height; unsigned short planeCount; unsigned short bitDepth; unsigned int compression; unsigned int compressedImageSize; unsigned int horizontalResolution; unsigned int verticalResolution; unsigned int numColors; unsigned int importantColors; }BmpImageInfo; typedef struct { unsigned char blue; unsigned char green; unsigned char red; unsigned char reserved; }Rgb; typedef struct { BmpHeader header; BmpImageInfo info; Rgb colors[256]; unsigned short image[1]; }BmpFile; but i only need RGB struct. So lets say i read "in.bmp": FILE *inFile, *outFile; inFile = fopen("C://in.bmp", "rb"); Rgb Palette[256]; for(i=0;i<256;i++) { fread(&Palette[i],sizeof(Rgb),1,inFile); } fclose(inFile); is this correct ? how do i write only the RGB information to a file ? can anyone please give me some information please . Thank you.

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >