Search Results

Search found 6963 results on 279 pages for 'ia 32'.

Page 72/279 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • conceptually different entities with a few similar properties should be stored in one table or more?

    - by Haghpanah
    Assume A and B are conceptually different entities that have a few similar properties and of course their own specific properties. In database design, should I put those two entities in one big aggregated table or two respectively designed tables. For instance, I have two types of payment; Online-payment and Manual-payment with following definition, TABLE [OnlinePayments] ( [ID] [uniqueidentifier], [UserID] [uniqueidentifier], [TrackingCode] [nvarchar](32), [ReferingCode] [nvarchar](32), [BankingAccID] [uniqueidentifier], [Status] [int], [Amount] [money], [Comments] [nvarchar](768), [CreatedAt] [datetime], [ShopingCartID] [uniqueidentifier], ) And TABLE [ManualPayments] ( [ID] [uniqueidentifier], [UserID] [uniqueidentifier], [BankingAccID] [uniqueidentifier], [BankingOrgID] [uniqueidentifier], [BranchName] [nvarchar](64), [BranchCode] [nvarchar](16), [Amount] [money], [SlipNumber] [nvarchar](64), [SlipImage] [image], [PaidAt] [datetime], [Comments] [nvarchar](768), [CreatedAt] [datetime], [IsApproved] [bit], [ApprovedByID] [uniqueidentifier], ) One of my friends told me that creating two distinct tables for such similar entities is not a well design method and they should be put in one single table for the sake of performance and ease of data manipulations. I’m now wondering what to do? What is the best practice in such a case?

    Read the article

  • wpf: How to keep an image stay in its original size?

    - by Martin Luo
    hi, guys! i have a problem about the image display in wpf. here's my code <Button HorizontalAlignment="Left" Grid.Column="1" Grid.Row="5" Margin="0,5"> <Button.Content> <StackPanel Orientation="Horizontal" Margin="10,0"> <Image Source="/images/user_add.png" Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" Width="24" Height="24" /> <TextBlock Text="??" /> </StackPanel> </Button.Content> </Button> i hava the image with original size 32*32, but when i ran the above code, the image will stretch to fill all the space, beyond its original size, and i also set the "Stretch" property to "None", but it seems that it doesn't work. so, how can i fix this problem? thank u~~~!

    Read the article

  • Displaying same icon in 2 different sizes on c#

    - by ET
    My goal is to display the same icon twice, but each time in different size. I tried the following: FileStream fs = new FileStream("name_of_the_icon_file.ico", FileMode.Open); Icon ico = new Icon(fs, 32, 32); //create an in-memory instance of the icon, size 32x32 Icon ico2 = new Icon(fs, 16, 16); //create an in-memory instance of the icon, size 16x16 ... Graphics.DrawIcon(ico, /*some point*/); Graphics.DrawIcon(ico2, /*some other point*/); The last line throws an ArgumentException: Value does not fall within the expected range. Can some one explain me whats wrong and whats the way to do this right?

    Read the article

  • Simple integer encryption

    - by tloflin
    Is there a simple algorithm to encrypt integers? That is, a function E(i,k) that accepts an n-bit integer and a key (of any type) and produces another, unrelated n-bit integer that, when fed into a second function D(i,k) (along with the key) produces the original integer? Obviously there are some simple reversible operations you can perform, but they all seem to produce clearly related outputs (e.g. consecutive inputs lead to consecutive outputs). Also, of course, there are cryptographically strong standard algorithms, but they don't produce small enough outputs (e.g. 32-bit). I know any 32-bit cryptography can be brute-forced, but I'm not looking for something cryptographically strong, just something that looks random. Theoretically speaking it should be possible; after all, I could just create a dictionary by randomly pairing every integer. But I was hoping for something a little less memory-intensive.

    Read the article

  • C# dll import function correctly

    - by poco
    I am trying to import a function from a c dll into C#. The c function looks like this unsigned short write_buffer( unsigned short device_number, unsigned short word_count, unsigned long buffer_link, unsigned short* buffer) my attempt at a C# import looks like this [DllImport("sslib32.dll", CharSet = CharSet.Ansi, SetLastError = true)] private static extern ushort write_buffer(ushort deviceNumber, ushort wordCount, UInt32 bufferLink, IntPtr buffer) In C# i have a Dictionary of messages that i would like to pass to this function. The Dictionary looks like this: Dictionary<string, List<ushort>> msgs I am a bit confused how to make a make a proper call to pass msgs as the buffer. deviceNumber is 2, wordCount is 32, and buffLink is 0. So i know the call should look something like this write_buffer(2,32,0, msgs[key]); Obviously i am getting an invalid argument for the IntPtr. What is the proper way to make this call?

    Read the article

  • Float32 to Float16

    - by Goz
    Can someone explain to me how I convert a 32-bit floating point value to a 16-bit floating point value? (s = sign e = exponent and m = mantissa) If 32-bit float is 1s7e24m And 16-bit float is 1s5e10m Then is it as simple as doing? int fltInt32; short fltInt16; memcpy( &fltInt32, &flt, sizeof( float ) ); fltInt16 = (fltInt32 & 0x00FFFFFF) >> 14; fltInt16 |= ((fltInt32 & 0x7f000000) >> 26) << 10; fltInt16 |= ((fltInt32 & 0x80000000) >> 16); I'm assuming it ISN'T that simple ... so can anyone tell me what you DO need to do?

    Read the article

  • How select data from SQLite table where date = week of year?

    - by vovaxo
    I have table expense: "create table " + Expense.TABLE_NAME + "(" + Expense.ID + " integer primary key autoincrement not null, " + Expense.CATEGORY_ID + " integer, " + Expense.ITEM + " text, " + Expense.PRICE + " real, " + Expense.DATE + " date, " + Expense.TIME + " time);"; And I want to select Expense.PRICE where Expense.DATE = current day/week/month. I tried to do this cursor = mDB.rawQuery("select " + Expense.PRICE + " where " + " (strftime('%W', " + Expense.DATE + "))" + "=" + week, null); where week is week = calendar.get(Calendar.WEEK_OF_YEAR); but it gives an error in cursor: 09-15 09:32:02.647: E/AndroidRuntime(18939): Caused by: java.lang.NullPointerException 09-15 09:32:02.647: E/AndroidRuntime(18939): at com.pllug.summercamp.expensemanager.DataAdapter.getPrice(DataAdapter.java:242)

    Read the article

  • C: Reading file with a starting point

    - by Shinka
    A simple question but I can't find the answer in my book. I want to read a binary file to seed a random number generator, but I don't want to seed my generator with the same seed each time I call the function, so I will need to keep a variable for my position in the file (not a problem) and I would need to know how to read a file starting a specific point in the file (no idea how). The code: void rng_init(RNG* rng) { // ... FILE *input = fopen("random.bin", "rb"); unsigned int seed[32]; fread(seed, sizeof(unsigned int), 32, input); // seed 'rng'... fclose(input); }

    Read the article

  • VB.NET encoding one character wrong

    - by Nick Spiers
    I have a byte array that I'm encoding to a string: Private Function GetKey() As String Dim ba() As Byte = {&H47, &H43, &H44, &H53, &H79, &H73, &H74, &H65, &H6D, &H73, &H89, &HA, &H1, &H32, &H31, &H36} Dim strReturn As String = Encoding.ASCII.GetString(ba) Return strReturn End Function Then I write that to a file via IO.File.AppendAllText. If I open that file in 010 Editor (to view the binary data) it displays as this: 47 43 44 53 79 73 74 65 6D 73 3F 0A 01 32 31 36 The original byte array contained 89 at position 11, and the encoded string contains 3F. If I change my encoding to Encoding.Default.GetString, it gives me: 47 43 44 53 79 73 74 65 6D 73 E2 80 B0 0A 01 32 31 36 Any help would be much appreciated!

    Read the article

  • How do I determine the cause of Qt's "*** is not a valid Qt plugin" error?

    - by chadjoan
    When I print the value of errorString from my QPluginLoader object, I get this: The file 'C:/pyprojects/test/qsqlpsqld4.dll' is not a valid Qt plugin. I would like to avoid some days worth of doing the time consuming "guess-and-check" methodology that my current internet searches reveal (so far none of them seem relevant anyways). Is there a way for me to get the Qt library itself to tell me why it is refusing to load this plugin? I don't want to guess; I want to know. Context: I am on Windows 7 running Qt 4.8.5 (32-bit, MinGW) and the qsqlpsqld4.dll file is also 32-bit and compiled with MinGW. I am using PySide to interact with Qt.

    Read the article

  • How to print size_t variable portably?

    - by ArunSaha
    I have a variable of type size_t, and I want to print it using printf(). What format specifier do I use to print it portably? In 32-bit machine, %u seems right. I compiled with g++ -g -W -Wall -Werror -ansi -pedantic, and there was no warning. But when I compile that code in 64-bit machine, it produces warning. size_t x = <something>; printf( "size = %u\n", x ); warning: format '%u' expects type 'unsigned int', but argument 2 has type 'long unsigned int' The warning goes away, as expected, if I change that to %lu. The question is, how can I write the code, so that it compiles warning free on both 32- and 64- bit machines? Edit: I guess one answer might be to "cast" the variable into an unsigned long, and print using %lu. That would work in both cases. I am looking if there is any other idea. (C, C++)

    Read the article

  • x86 Assembly - printf doesn't print without "\n"

    - by Bitani
    So I'm confused. I'm going through the book "Programming from the Ground Up" and am working with using libraries. printf is working just fine so long as I include a "\n" in the string, but without it it will print absolutely nothing. Any idea why this happens? Code: .section .data my_str: .ascii "Jimmy Joe is %d years old!\n\0" my_num: .long 76 .section .text .globl _start _start: pushl my_num pushl $my_str call printf movl $1, %eax movl $0, %ebx int $0x80 Also, when I use -m elf_i386 for 32-bit mode and -dynamic-linker /lib/ld-linux.so.2 -lc to link, I get the warning ld: skipping incompatible /usr/lib64/libc.so when searching for -lc If that makes any difference, or if anybody has any suggestions as to how to have it load the 32-bit library directly. Thanks!

    Read the article

  • jQuery pagination go to page on input value change

    - by JV10
    I'm creating some pagination for my website, and want to use an input-element to navigate between pages. Like the following example: The input would require the "return" key to be hit for the script to trigger. If the value entered is not within range and alert would trigger. e.g. If there was 32 pages, "Please enter a value between 1 and 32" Can this be done using jQuery or javascript, by detecting the value change within the range of pages and redirecting to that page? I'm trying to create the same device on Getty Images: http://www.gettyimages.com.au/Search/Search.aspx?contractUrl=2&language=en-US&family=creative&p=ball&assetType=image&clarification=ball%3A60847

    Read the article

  • RBF neural networks

    - by Infinity
    Hello guys! I would like to apply RBF neural networks to teach my system. I have a system with an input: | 1 2 3 4 5 6 ... 32 | 33 | | 1000 0001 0010 0100 1000 1000 ... 0100 | 0 0 1 | You have to read this without the "|" character. I just wanted you to see that the last three elements in the input are staying together. The result have to be a number between 1-32, which has the value "1000" in the input. In my training set I will always have a result for an array of this kind. What kind of functions can I use for the teaching algorithm? Can you point me please to the right way? If you can't understand my description please don't hesitate to ask about it. Thank you guys for your help!

    Read the article

  • Is there a way to transfer windows license to a different machine?

    - by Alex Khvatov
    I purchased a license and used Windows 7 Home Premium 32 bit OS for a while. But recently I bought a 64 bit version to take advantage of the larger RAM the machine had and hence reinstalled the OS and activated a new license for the 64-bit version. Now, I am in a need to install the 32 bit version on another machine. How do I go about reactivating a license on another machine? (again the license currently is not used) Am I going to have issues with Microsoft not letting me reactivate that license on a different machine? Thank you.

    Read the article

  • C++ execution error: This application has requested the Runtime to terminate it in an unusual way.

    - by user1846547
    I am trying to run a C++ program and am getting the following error message when I try to run the program using - Codeblocks IDE and SQL API: "This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. Process returned 3 (0x3) execution time : 7.547 s Press any key to continue." The program compiles fine but on execution throws this error. My current OS is Windows server 2003 - SP2 (32 bit). Also program compiles and executes fine on Windows XP (32 bit) without any hassles. I checked the services (services.msc) running on my XP machine and compared with Windows server 2003 and found the settings same. Can someone please have a look and help me resolve the issue? thanks, Dhruv

    Read the article

  • Darwin kernel architecture and OS X, 64bit on 32bit kernel, how does this work?

    - by overscore
    The OS X Lion (10.7) OS runs on mostly 64-bit binaries as reported by Activity Monitor. Given this, and the fact that my laptop runs a 32-bit version of the EFI and thus also a 32-bit kernel, how does the arch mixing work in general? Darwin Kernel Version 11.3.0: Thu Jan 12 18:48:32 PST 2012; root:xnu-1699.24.23~1/RELEASE_I386 Normally one would run 32b binaries on x86_64, but the other way around would require pushing the cpu into 64b mode, which AFAIK cannot be undone. Hope this question is clear enough..

    Read the article

  • i get error when i try to upload a file?

    - by getaway
    I keep getting an error:Notice: Undefined index: on line 35 line 35: $handle = new Upload($_FILES['my_field']); this is my input field <input type="file" size="32" name="my_field" value="" /> I do not understand this error, thanks!!! EDIT: <form name="upload" id="upload" enctype="multipart/form-data" method="post" action="actions/upload.php" /> <p><input type="file" size="32" name="my_field" value="" /></p> <p class="button"><input type="hidden" name="action" value="image" /> <br> <input style="margin-left:224px;" type="submit" name="submit" value="upload" />

    Read the article

  • How to get and set dynamic or runtime input in XStream

    - by RSR
    i am getting xml tags as input in java web services. i need that to parsed to java objects i had tried everything like XStream,XMLEncoder, JaxB Concepts also. But I don't know what is the problem. i am having pojo class for that input but it is not working. example for xml tags : 1034|Chromepet|Chennai|117.97.24.32 first to extract data : i need only data from .... and then Using Xstream or XmlEncoder i have to parse it like i want only devsrlno:101 signalstrength : 30 devicedatetime:01/24/2010 10:10:23 AM gprsdatetime:01/24/2010 10:10:23 AM debug:yes autoip :1034|Chromepet|Chennai|117.97.24.32. please tell me how to do it

    Read the article

  • Database table schema design - varchar(n). Suitable choice of N

    - by morpheous
    Coming from a C background, I may be getting too anal about this and worrying unnecessarily about bits and bytes here. Still, I cant help thinking how the data is actually stored and that if I choose an N which is easily factorizable into a power of 2, the database will be more effecient in how it packs data etc. Using this "logic", I have a string field in a table which is a variable length up to 21 chars. I am tempted to use 32 instead of 21, for the reason given above - however now I am thinking that I am wasting disk space because there will be space allocated for 11 extra chars that are guaranteed to be never used. Since I envisage storing several tens of thousands of rows a day, it all adds up. Question: Mindful of all of the above, Should I declare varchar(21) or varchar(32) and why?

    Read the article

  • template function error..

    - by sil3nt
    Hi there, I have function which takes in an parameter of a class called "Triple", and am returning the averge of 3 values of type float. template <typename ElemT> float average(Triple ElemT<float> &arg){ float pos1 = arg.getElem(1); float pos2 = arg.getElem(2); float pos3 = arg.getElem(3); return ( (pos1+pos2+po3) /3 ); } when i try compiling this i get q2b.cpp:32: error: template declaration of `float average' q2b.cpp:32: error: missing template arguments before "ElemT" not quite sure what this means.

    Read the article

  • How is the implicit segment register of a near pointer determined?

    - by Daniel Trebbien
    In section 4.3 of Intel 64® and IA-32 Architectures Software Developer's Manual. Volume 1: Basic Architecture, it says: A near pointer is a 32-bit offset ... within a segment. Near pointers are used for all memory references in a flat memory model or for references in a segmented model where the identity of the segment being accessed is implied. This leads me to wondering: how is the implied segment register determined? I know that (%eip) and displaced (%eip) (e.g. -4(%eip)) addresses use %cs by default, and that (%esp) and displaced (%esp) addresses use %ss, but what about (%eax), (%edx), (%edi), (%ebp) etc., and can the implicit segment register depend also on the instruction that the memory address operand appears in?

    Read the article

  • LibGDX: transform Texture to TextureRegion

    - by FeRo2991
    I am creating a TowerDefence Game in LibGDX and am now trying to replace the old Tile with a new StaticTiledMapTile. But to create a StaticTiledMapTile I need a TextureRegion, not a Texture. Now I'm trying to create a TextureRegion, which contains the whole Texture, but it doesn't seem to work. It always appears distorted. I have tried the following: TextureRegion region = new TextureRegion(new Texture("someImg.png"), 0, 0, 32, 32); StaticTileMapTile tile = new StaticTiledMapTile(region); getLayer().getCell(x,y).setTile(tile); //setting the new tile In my opinion this should work (if the image, as it is, is 32px wide and 32px high).

    Read the article

  • Showing an image after laoding it from sql database

    - by user330075
    I have a problem showing the image form database in a view Details and a ImageController. Inside the view i have: img src=Url.Action("GetFile","Image", new {id= Model.id}) and in controller: public FileContentResult GetFile(int idl) { //int idl = 32; SqlDataReader rdr; byte[] fileContent = null; ........... return File(,,); } When the view is called, function GetFile it just wont work,but if i cut out the parameter int id1 and i instantiate it as a variable it'l work. public FileContentResult GetFile() { int idl = 32; SqlDataReader rdr; byte[] fileContent = null; ........... return File(,,); } Why?

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >