Search Results

Search found 8189 results on 328 pages for 'fedora 16'.

Page 201/328 | < Previous Page | 197 198 199 200 201 202 203 204 205 206 207 208  | Next Page >

  • Problem with parsing XML into table variable

    - by Stanley Ross
    I'm using the following code to read a SQL XML Variable into a table variable. I am getting the following error. " Incorrect syntax near '.'. " Can't quite Figure it out DECLARE @LOBS Table ( LineGUID varchar(40) ) DECLARE @lg xml SET @lg = '<?xml version="1.0" encoding="utf-16" standalone="yes"?> <Table> <LOB> <LineGuid>d6e3adad-8c53-4768-91a3-745c0dae0e08</LineGuid> </LOB> <LOB> <LineGuid>4406db8f-0d19-47da-953b-afc1db38b124</LineGuid> </LOB> </Table>' INSERT INTO @LOBS(LineGUID) SELECT ParamValues.ID.value('.','VARCHAR(40)') FROM @lg.nodes('/Table/LOB/LineGuid') AS ParamValues(ID)

    Read the article

  • Sqllite doesn' write a column

    - by user1904675
    I do this: DatabaseHelper dbHelper = new DatabaseHelper(context); dbHelper.getWritableDatabase(); String sql = "insert into "+getTableName()+("+DatabaseHelper.PRODUCT_MARK+","+DatabaseHelper.PRODUCT_NAME+") VALUES ('"+input.getMark()+"','"+input.getName()+"')"; System.out.println(sql); getDatabase().execSQL(sql); dbHelper.close(); The system print 12-14 16:53:33.857: I/System.out(1350): insert into product (pMark,name) VALUES ('aaaaa ','zz') But when I read from db the property mark is not valorized... Where is my mistake?

    Read the article

  • Sql server execute permission; failure to apply permissions

    - by WestDiscGolf
    I've just migrated from SQL2000 to SQL2008 and I have started getting an execute permission issue on a stored proc which uses sp_OACreate. The rest of the system works fine with the db login which has been setup and added to the database. I've tried: USE master GO GRANT EXEC ON sp_OACreate TO [dbuser] GO But this fails with the following error: Msg 15151, Level 16, State 1, Line 1 Cannot find the user 'dbuser', because it does not exist or you do not have permission. I'm logged into the server as sa with full permissions. I can execute a similar sql statement and apply the permissions to a server role, however not a login/user. How do I apply the changes to the specific user/login? I can apply the permissions to the public role and it resolves my issue; however this seems to be a security issue to me which I don't really want to apply to the live server.

    Read the article

  • Reading bytes from JavaScript string

    - by Jan
    I have a string containing binary data in JS. Now I want to read, for example, an integer from it. So I get the first 4 characters, use charCodeAt, do some shifting etc. to get an integer. Problem is that strings in JS are UTF-16 (instead of ASCII) and charCodeAt often returns values higher than 256. The Mozilla reference states that "The first 128 Unicode code points are a direct match of the ASCII character encoding." (what about ASCII values 128?) How can I convert the result of charCodeAt to an ASCII value? Or is there a better way to convert a string of four characters to a 4 byte integer?

    Read the article

  • C++ shifting bits

    - by Bobby
    I am new to shifting bits, but I am trying to debug the following snippet: if (!(strcmp(arr[i].GetValType(), "f64"))) { dem_content_buff[BytFldPos] = tmp_data; dem_content_buff[BytFldPos + 1] = tmp_data >> 8; dem_content_buff[BytFldPos + 2] = tmp_data >> 16; dem_content_buff[BytFldPos + 3] = tmp_data >> 24; dem_content_buff[BytFldPos + 4] = tmp_data >> 32; dem_content_buff[BytFldPos + 5] = tmp_data >> 40; dem_content_buff[BytFldPos + 6] = tmp_data >> 48; dem_content_buff[BytFldPos + 7] = tmp_data >> 56; } I am getting a warning saying the lines with "32" to "56" have a shift count that is too large. The "f64" in the predicate just means that the data should be 64bit data. How should this be done?

    Read the article

  • Is the use of union in this matrix class completely safe?

    - by identitycrisisuk
    Unions aren't something I've used that often and after looking at a few other questions on them here it seems like there is almost always some kind of caveat where they might not work. Eg. structs possibly having unexpected padding or endian differences. Came across this in a math library I'm using though and I wondered if it is a totally safe usage. I assume that multidimensional arrays don't have any extra padding and since the type is the same for both definitions they are guaranteed to take up exactly the same amount of memory? template<typename T> class Matrix44T { ... union { T M[16]; T m[4][4]; } m; }; Are there any downsides to this setup? Would the order of definition make any difference to how this works?

    Read the article

  • Javascript & jquery : Unable to increment within a form

    - by Daniyal
    I got a simple increment function like this: $(function(){ $("#inc").click(function(){ var value = parseInt($(":text[name='ice_id']").val()) + 1; $(":text[name='ice_id']").val(value); }); $("#dec").click(function(){ var value = parseInt($(":text[name='ice_id']").val()) - 1; $(":text[name='ice_id']").val(value); }); }); the ice_id text field is embedded within a form <form id="masterSubmit" name="masterSubmit" action="" method="post"> <td><input id="ice_id" type="text" name="ice_id" size="16" maxlength="15"></td> </form> When I try now to increment , it successfully increments a number, but shows the following weird behavior: It 'refreshes' the site, so that the content of the text field is gone. This behavior disappears, if I comment out the form tags ...unfortunately the form tags are required for an AJAX-submit. Are there any ways to avoid this problem? Thanks in advance for any hints and best regards Daniyal

    Read the article

  • PHP returns a negative number?

    - by Legend
    I am trying to query a bittorrent tracker and am using unpack to get the list of IPs from the response. So, something like this: $ip = unpack("N", $peers); $ip_add = ($ip[1]>>24) . "." . (($ip[1]&0x00FF0000)>>16) . "." . (($ip[1]&0x0000FF00)>>8) . "." . ($ip[1]&0x000000FF); But, for some reason, I am getting the following IP addresses when I print $ip_add: 117.254.136.66 121.219.20.250 -43.7.52.163 Does anyone know what could be going wrong?

    Read the article

  • Why is it so hard to build a gtk programe without console using cmake in windows?

    - by Runner
    I'm following the tuto: http://zetcode.com/tutorials/gtktutorial/firstprograms/ It works but each time I double click on the executable,there is a console which I don't want it there. How do I get rid of that console? I tried this: add_executable(Cmd WIN32 cmd.c) But got this fatal error: MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup Cmd.exe : fatal error LNK1120: 1 unresolved externals While using gcc directly works: gcc -o Cmd cmd.c -mwindows .. I'm guessing it has something to do with the entry function: int main( int argc, char *argv[]),but why gcc works? How can I make it work with cmake?

    Read the article

  • Image processing custom filter 7 by 7

    - by ladiesMan217
    Lets say I have a 7 by 7 neighborhood around a pixel that looks like this 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 and I wanna filter the above by replacing the pixel p by the average of those pixels whose value lie in the range -10<=p_value <=10. I am new to image processing and I think in this case p_value is 25 and around 25 that are many pixel values in that range but don't exactly know to construct a convolution filter out of it.

    Read the article

  • Is my way of doing threads in Android correct?

    - by Charlie
    Hi, I'm writing a live wallpaper, and I'm forking off two separate threads in my main wallpaper service. One updates, and the other draws. I was under the impression that once you call thread.start(), it took care of everything for you, but after some trial and error, it seems that if I want my update and draw threads to keep running, I have to manually keep calling their run() methods? In other words, instead of calling start() on both threads and forgetting, I have to manually set up a delayed handler event that calls thread.run() on both the update and draw threads every 16 milliseconds. Is this the correct way of having a long running thread? Also, to kill threads, I'm just setting them to be daemons, then nulling them out. Is this method ok? Most examples I see use some sort of join() / interrupt() in a while loop...I don't understand that one...

    Read the article

  • message queue : selection and sizing

    - by user238591
    Hi, I have 20 messages/s, each 1 - 1.5 Mbytes. I need High Availability (2 to 4 servers min). I need low latencey (high daily volume - full RAM prefered). I need persistent poisoned messages queue. Only few clients (about 16), locally. I can have 12-16G bytes RAM per server (brooker). Which JMS message queue / messaging would you recommend ? On what configuration (CPU/RAM) ? Can I propose optionnal NAS persistence (in case of final delivery failure) ? Thanks

    Read the article

  • 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

  • Why checking out working copy with svn:// access method, with 127.0.0.1 fails , but,with localhost w

    - by Banani
    Hi!, I have setup svnserve server (1.6.5,plain, without apache) on Fedora. I start the svnserve with the command 'svnserve -d --foreground --listen-port=3690 -r /usr/local/svn-repos/proj-test' When user trying to checkout working copy from the local machine with command 'svn checkout svn://127.0.0.1/proj-test' gets following error svn: URL 'svn://127.0.0.1/proj-test' doesn't exists but, 'svn checkout svn://localhost/proj-test' works. I am curious to know why using 127.0.0.1 with svn:// fails? Thanks. Banani

    Read the article

  • Why isn't my favicon appearing in IE7/8?

    - by X3Maverick
    Page of interest: https://www.gsb-yourbank.com/test/ ICO file: https://www.gsb-yourbank.com/test/favicon.ico My favicon is a 16x16 resolution, 16-color ICO file. It will not appear in IE 7/8 no matter what I do! I've tried everything I can think of, including: generating the ICO with a variety of different utilities, changing the syntax of the favicon link elements in the document head, using absolute, relative, and root-relative URLs in the favicon link elements, using a PNG instead of an ICO file, ensuring that I am uploading the file via FTP in binary mode, As a longtime web developer/programmer, I can't believe that this is tripping me up. Any help would be greatly appreciated.

    Read the article

  • How to structure opening hours of a place? May-be there's even an ontology for it?

    - by Ago
    Does anyone know any ontology which specifies opening hours of places? For example, I have a museum, which has 2 seasons. For low season (season start and end is specified), it is opened 10.00 - 18.00 on weekdays and 10-16 on saturday (on sunday it's closed), for high season it's opened 10-20 on weekdays and 10-18 on weekend. If there is no ontology, may-be people have experience, how best to structure information like that? I'm describing information in RDF. But whatever comments are welcome (even if you have relational database which holds given data). Thanks

    Read the article

  • Rounding issue when adding floats in python, is this normal?

    - by thepearson
    I just wanted to know if this behavior is expected. If so, can someone explain to me why. This has probably been answered elsewhere I can't seem to find it using Google. Probably not searching with the right terms. I am running Ubuntu 10.04. Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> var = 10.0 >>> var 10.0 >>> var + 5 15.0 >>> var + 5.1 15.1 >>> var + 5.2 15.199999999999999 >>>

    Read the article

  • memset on array of structures in C++

    - by garry
    I have another memset question. It appears as if the code I am editing may have some issues (or it's not done the same way in different files) A::LRM las[9]; //A and LRM are both structures with BOOLS and INTS memset(&las, 0, sizeof(las)); typedef Sec SecArray[16]; SecArray rad_array; memset(rad_array, 0, sizeof(SecArray)); The second example appears to be correct because rad_array is the same as the first position in the array. Then the sizeof(SecArray)) would make sense. The first one doesn't seem correct to me. All structs are just BOOLs and INTS nothing dynamic in them. My understanding from my other post about memset was that it followed this format. memset("pointer to object", "what to set it to", "size of object") Can anyone tell me what exactly is going on here if I am incorrect with my theory.

    Read the article

  • How do I use an enum with custom values for a Sharepoint Web part?

    - by Jeff
    I'm trying to design a Web Part that has a drop-down list for the user to choose from. Eventually, these values will be automatically generated based on some kind of outside data source, so they're going to have somewhat arbitrary numeric values associated with them. This is the code I have now: public enum filterChoice { All=0, BOCC=12, Sustainability=15, Clerk=4, DA=13, Emergency=7, Highlights=3, POS=6, PR=1, PH=5, SHPR=2, Test=8, Transportation=14, Volunteer=16 }; These are different categories I want the user to choose from. When I choose one and save the settings for my Web Part, Sharepoint is only saving the values in numeric order; that is, All=0, BOCC=1, Sustainability=3 [...] so my Web Part then thinks the user chose the value with the corresponding number (PR when they chose BOCC, Highlights when they chose Sustainability, etc.) How can I make Sharepoint honor my custom values?

    Read the article

  • Problem using AudioRecord with 8-bit encoding in android

    - by maxsap
    Hello, I have made an application that records from the phones microphone using the AudioRecord and 16-bit encoding, and I am able to playback the recording. For some compatibility reason I need to use 8-bit encoding, but when I try to run the same program using that encoding I keep getting an Invalid Audio Format. my code is : int bufferSize = AudioRecord.getMinBufferSize(11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT); AudioRecord recordInstance = new AudioRecord( MediaRecorder.AudioSource.MIC, 11025, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_8BIT, bufferSize); Any one knows what is the problem? according to the documentation AudioRecord is capable of 8-bit encoding. thanks in advanced maxsap.

    Read the article

  • Code corresponding to leaks with Visual Leak Detector

    - by matt
    I am trying to use Visual Leak Detector in Visual Studio 2008, here is an example of the output I get: Detected memory leaks! Dumping objects -> {204} normal block at 0x036C1568, 1920 bytes long. Data: < > 80 08 AB 03 00 01 AB 03 80 F9 AA 03 00 F2 AA 03 {203} normal block at 0x0372CC68, 40 bytes long. Data: <( > 28 00 00 00 80 02 00 00 E0 01 00 00 01 00 18 00 {202} normal block at 0x0372CC00, 44 bytes long. Data: << E > 3C 16 45 00 80 02 00 00 E0 01 00 00 01 00 00 00 The user's guide says to click on any line to jump to the corresponding file/line of code ; I tried clicking on every line but nothing happens! What am I missing?

    Read the article

  • PHP Variable Encryption

    - by NCoder
    I have the following code that creates an encryption in PHP: $password = "helloworld"; $passwordupper = strtoupper($password); $passwordencode = mb_convert_encoding($passwordupper, 'UTF-16LE'); $passwordsha1 = hash("SHA1", $passwordencode); $passwordbase64 = base64_encode($passwordsha1); The instructions I have from the system I'm trying to connect to states: The encoding process for passwords is: first convert to uppercase, then Unicode it in little-endian UTF 16, then SHA1 it then base64 encode it. I think I'm doing something wrong in my code. Any ideas?! Thanks! NCoder

    Read the article

  • Finding number of different paths

    - by peiska
    I have a game that one player X wants to pass a ball to player Y, but he can be playing with more than one player and the others players can pass the ball to Y. I want to know how many different paths can the ball take from X to Y? for example if he is playing with 3 players there are 5 different paths, 4 players 16 paths, if he is playing with 20 players there are 330665665962404000 paths, and 40 players 55447192200369381342665835466328897344361743780 that the ball can take. the number max. of players that he can play with is 500. I was thinking in using Catalan Numbers? do you think is a correct approach to solve this? Can you give me some tips.

    Read the article

  • tiled images in swing

    - by sasquatch90
    I have task to prepare two windows with swing. One contains grid of squares, with random numbers in them. In second I need to load pieces of tiled image and then show them in the correct order, forming tiled image. Windows should look like this : http://img535.imageshack.us/img535/3129/lab8a.jpg Okay so how to bite this ? I've used swing only few times to draw some 2d polylines, so basically I just theoretically now what to do. Ok, so window number 1: I start with creating Jframe for the window. Then I do for loop and in it create 16 JLabels with random numbers in them ? How to set margins between each tile and the whole window ? Window number 2 : So I start the same, but instead of loading numbers I add images ? Now, how can I load image from file and then set it as background ?

    Read the article

  • updating a shape in scene with a for loop using javafx

    - by Susanta
    Following is a code fragment. I am updating a rectangle using a for loop when a button is pressed. This is a model for my ultimate intention of showing visualization of data model as it changes large number of times inside a for loop. It works but I see only one change. Now since I am changing the width randomly I should see large number of changes. It seems I am making a wrong assumption on something basic. The code goes below: 7 var rec: Rectangle = Rectangle { 8 x: 10, y: 10 9 width: 140, height: 90 10 fill: Color.BLACK 11 } 12 13 Stage { 14 title: "MyApp" 15 scene: Scene { 16 width: 200 17 height: 200 18 content: [ 19 rec, 20 Button { 21 text: "Button" 22 action: function () { 23 for (i in [1..999]) { 24 rec.width = 25 + java.lang.Math.random()*50; 25 } 26 } 27 } 28 ] 29 } 30 }

    Read the article

< Previous Page | 197 198 199 200 201 202 203 204 205 206 207 208  | Next Page >