Search Results

Search found 22631 results on 906 pages for 'null character'.

Page 13/906 | < Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >

  • Meta tags with html special character codes?

    - by GEspinha
    This question is regarding best practices on SEO development meta tag filling. A name written in the Latin or the Cyrillic alphabet has certain special characters, such as the ccedil C, for example. When populating meta tags and other SEO assets in a page, what should be used, the HTML character code (for the given example: &ccedil;), the actual character or another character that looks close (using a C for the given example)?

    Read the article

  • Moving Character in C# XNA Not working

    - by Matthew Stenquist
    I'm having trouble trying to get my character to move for a game I'm making in my sparetime for the Xbox. However, I can't seem to figure out what I'm doing wrong , and I'm not even sure if I'm doing it right. I've tried googling tutorials on this but I haven't found any helpful ones. Mainly, ones on 3d rotation on the XNA creators club website. My question is : How can I get the character to walk towards the right in the MoveInput() function? What am I doing wrong? Did I code it wrong? The problem is : The player isn't moving. I think the MoveInput() class isn't working. Here's my code from my character class : using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; namespace Jumping { class Character { Texture2D texture; Vector2 position; Vector2 velocity; int velocityXspeed = 2; bool jumping; public Character(Texture2D newTexture, Vector2 newPosition) { texture = newTexture; position = newPosition; jumping = true; } public void Update(GameTime gameTime) { JumpInput(); MoveInput(); } private void MoveInput() { //Move Character right GamePadState gamePad1 = GamePad.GetState(PlayerIndex.One); velocity.X = velocity.X + (velocityXspeed * gamePad1.ThumbSticks.Right.X); } private void JumpInput() { position += velocity; if (GamePad.GetState(PlayerIndex.One).Buttons.A == ButtonState.Pressed && jumping == false) { position.Y -= 1f; velocity.Y = -5f; jumping = true; } if (jumping == true) { float i = 1.6f; velocity.Y += 0.15f * i; } if (position.Y + texture.Height >= 1000) jumping = false; if (jumping == false) velocity.Y = 0f; } public void Draw(SpriteBatch spriteBatch) { spriteBatch.Draw(texture, position, Color.White); } } }

    Read the article

  • How to find the occurrence of particular character in string - CHARINDEX

    - by Vipin
    Many times while writing SQL, we need to find if particular character is present in the column data. SQL server possesses an in-built function to do this job - CHARINDEX(character_to_search, string, [starting_position]) Returns the position of the first occurrence of the character in the string. NOTE - index starts with 1. So, if character is at the starting position, this function would return 1. Returns 0 if character is not found. Returns 0 if 'string' is empty. Returns NULL if string is NULL. A working example of the function is SELECT CHARINDEX('a', fname) a_First_occurence, CHARINDEX('a', fname, CHARINDEX('a', fname)) a_Second_occurrence FROM Users WHERE fname = 'aka unknown' OUTPUT ------- a_First_occurence a_Second_occurrence 1 3

    Read the article

  • Best practices in managing character states

    - by TheBroodian
    While in development of a character, I feel like I'm digging myself deeper into a hole every time I add more functionality to him, creating more bugs and it seems like my code is tripping over itself all over the place. What are the best practices when managing character states for a character that has a large selection of abilities and actions that they can perform, without their abilities interrupting each other and creating a mess overall?

    Read the article

  • Reportviewer stored procedure [closed]

    - by Liesl
    I want to write a stored procedure for my invoice reportviewer. After invoice is generated in reportviewer it must also add the data to my Invoice table. This is all my tables in my database: CREATE TABLE [dbo].[Waybills]( [WaybillID] [int] IDENTITY(1,1) NOT NULL, [SenderName] [varchar](50) NULL, [SenderAddress] [varchar](50) NULL, [SenderContact] [int] NULL, [ReceiverName] [varchar](50) NULL, [ReceiverAddress] [varchar](50) NULL, [ReceiverContact] [int] NULL, [UnitDescription] [varchar](50) NULL, [UnitWeight] [int] NULL, [DateReceived] [date] NULL, [Payee] [varchar](50) NULL, [CustomerID] [int] NULL, PRIMARY KEY CLUSTERED CREATE TABLE [dbo].[Customer]( [CustomerID] [int] IDENTITY(1,1) NOT NULL, [customerName] [varchar](30) NULL, [CustomerAddress] [varchar](30) NULL, [CustomerContact] [varchar](30) NULL, [VatNo] [int] NULL, CONSTRAINT [PK_Customer] PRIMARY KEY CLUSTERED ) CREATE TABLE [dbo].[Cycle]( [CycleID] [int] IDENTITY(1,1) NOT NULL, [CycleNumber] [int] NULL, [StartDate] [date] NULL, [EndDate] [date] NULL ) ON [PRIMARY] CREATE TABLE [dbo].[Payments]( [PaymentID] [int] IDENTITY(1,1) NOT NULL, [Amount] [money] NULL, [PaymentDate] [date] NULL, [CustomerID] [int] NULL, PRIMARY KEY CLUSTERED Create table Invoices ( InvoiceID int IDENTITY(1,1), InvoiceNumber int, InvoiceDate date, BalanceBroughtForward money, OutstandingAmount money, CustomerID int, WaybillID int, PaymentID int, CycleID int PRIMARY KEY (InvoiceID), FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID), FOREIGN KEY (WaybillID) REFERENCES Waybills(WaybillID), FOREIGN KEY (PaymentID) REFERENCES Payments(PaymentID), FOREIGN KEY (CycleID) REFERENCES Cycle(CycleID) ) I want my sp to find all waybills for specific customer in a specific cycle with payments made from this client. All this data must then be added into the INVOICE table. Can someone please help me or show me on the right direction? create proc GenerateInvoice @StartDate date, @EndDate date, @Payee varchar(30) AS SELECT Waybills.WaybillNumber Waybills.SenderName, Waybills.SenderAddress, Waybills.SenderContact, Waybills.ReceiverName, Waybills.ReceiverAddress, Waybills.ReceiverContact, Waybills.UnitDescription, Waybills.UnitWeight, Waybills.DateReceived, Waybills.Payee, Payments.Amount, Payments.PaymentDate, Cycle.CycleNumber, Cycle.StartDate, Cycle.EndDate FROM Waybills CROSS JOIN Payments CROSS JOIN Cycle WHERE Waybills.ReceiverName = @Payee AND (Waybills.DateReceived BETWEEN (@StartDate) AND (@EndDate)) Insert Into Invoices (InvoiceNumber, InvoiceDate, BalanceBroughtForward, OutstandingAmount) Values (@InvoiceNumber, @InvoiceDate, @BalanceBroughtForward, @ OutstandingAmount) go

    Read the article

  • AND is better or using Internal "IF"

    - by BDotA
    In a situation like this:" if ((metadata != null) && (metadata.TypeEnum != VariantInfoMetadata.CellTypeEnum.Status)) do you recommend to keep the code as it is above or do you think it is better to make an internal "if" statement and brake that AND into two sections where "outer if" makes sure metadata is not null and inner if does the rest of the checking. I think this way will take care of possible null refrence exception if value of metadata gets null?

    Read the article

  • Using macro to check null values [migrated]

    - by poliron
    My C code contains many functions with pointers to different structs as parameteres which shouldn't be NULL pointers. To make my code more readable, I decided to replace this code: if(arg1==NULL || arg2==NULL || arg3==NULL...) { return SOME_ERROR; } With that macro: NULL_CHECK(arg1,arg2,...) How should I write it, if the number of args is unknown and they can point to different structs?(I work in C99)

    Read the article

  • Can a conforming C implementation #define NULL to be something wacky

    - by janks
    I'm asking because of the discussion that's been provoked in this thread: http://stackoverflow.com/questions/2597142/when-was-the-null-macro-not-0/2597232 Trying to have a serious back-and-forth discussion using comments under other people's replies is not easy or fun. So I'd like to hear what our C experts think without being restricted to 500 characters at a time. The C standard has precious few words to say about NULL and null pointer constants. There's only two relevant sections that I can find. First: 3.2.2.3 Pointers An integral constant expression with the value 0, or such an expression cast to type void * , is called a null pointer constant. If a null pointer constant is assigned to or compared for equality to a pointer, the constant is converted to a pointer of that type. Such a pointer, called a null pointer, is guaranteed to compare unequal to a pointer to any object or function. and second: 4.1.5 Common definitions <stddef.h> The macros are NULL which expands to an implementation-defined null pointer constant; The question is, can NULL expand to an implementation-defined null pointer constant that is different from the ones enumerated in 3.2.2.3? In particular, could it be defined as: #define NULL __builtin_magic_null_pointer Or even: #define NULL ((void*)-1) My reading of 3.2.2.3 is that it specifies that an integral constant expression of 0, and an integral constant expression of 0 cast to type void* must be among the forms of null pointer constant that the implementation recognizes, but that it isn't meant to be an exhaustive list. I believe that the implementation is free to recognize other source constructs as null pointer constants, so long as no other rules are broken. So for example, it is provable that #define NULL (-1) is not a legal definition, because in if (NULL) do_stuff(); do_stuff() must not be called, whereas with if (-1) do_stuff(); do_stuff() must be called; since they are equivalent, this cannot be a legal definition of NULL. But the standard says that integer-to-pointer conversions (and vice-versa) are implementation-defined, therefore it could define the conversion of -1 to a pointer as a conversion that produces a null pointer. In which case if ((void*)-1) would evaluate to false, and all would be well. So what do other people think? I'd ask for everybody to especially keep in mind the "as-if" rule described in 2.1.2.3 Program execution. It's huge and somewhat roundabout, so I won't paste it here, but it essentially says that an implementation merely has to produce the same observable side-effects as are required of the abstract machine described by the standard. It says that any optimizations, transformations, or whatever else the compiler wants to do to your program are perfectly legal so long as the observable side-effects of the program aren't changed by them. So if you are looking to prove that a particular definition of NULL cannot be legal, you'll need to come up with a program that can prove it. Either one like mine that blatantly breaks other clauses in the standard, or one that can legally detect whatever magic the compiler has to do to make the strange NULL definition work. Steve Jessop found an example of way for a program to detect that NULL isn't defined to be one of the two forms of null pointer constants in 3.2.2.3, which is to stringize the constant: #define stringize_helper(x) #x #define stringize(x) stringize_helper(x) Using this macro, one could puts(stringize(NULL)); and "detect" that NULL does not expand to one of the forms in 3.2.2.3. Is that enough to render other definitions illegal? I just don't know. Thanks!

    Read the article

  • Create a JSON Array using Java

    - by Ankur
    Hi I want to create a JSON array. I have tried using: JSONArray jArray = new JSONArray(); while(itr.hasNext()){ int objId = itr.next(); jArray.put(objId, odao.getObjectName(objId)); } results = jArray.toString(); Note: odao.getObjectName(objId) retrieves a name based on the "object Id" which is called objId However I get a very funny looking array like [null,null,null,"SomeValue",null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"AnotherValue",null,null,null,null,null,null,null,null,null,null,"SomethingElse","AnotherOne","LastOne"] With only "LastOne" being displayed when I retrieve it using jQuery. The Array SHould look like {["3":"SomeValue"],["40":"AnotherValue"],["23":"SomethingElse"],["9":"AnotherOne"],["1":"LastOne"]} The numbers aren't showing up at all for some reason in the array that I am getting

    Read the article

  • linq hierarchy problem

    - by Pratik
    I reterive a result from sql server as ProjectDetailID,ProjectID,ParentID,...,C1,C2,C3,... where C1 implies(=) companyOne, C2=CompanyTwo ... etc and dynamically can have 'n' companies For time being lets consider only 3 companies, So I get : ProjectDetailID,ProjectID,ParentID,C1,C2,C3 10,1,0,NULL,NULL,NULL 10,2,1,NULL,NULL,NULL 10,3,2,90,NULL,NULL 10,4,2,NULL,60,NULL 10,10,1,70,NULL,NULL 10,5,10,20,40,NULL 10,13,2,NULL,NULL,NULL I want from this following result using LINQ (C#) ProjectDetailID,ProjectID,ParentID,C1,C2,C3 10,1,0,180,100,NULL 10,2,1,90,60,NULL 10,3,2,90,NULL,NULL 10,4,2,NULL,60,NULL 10,10,1,90,40,NULL 10,5,10,20,40,NULL 10,13,2,NULL,NULL,NULL The problem is that at parent level i have null value for a company but at its child i have some value, which i keep on adding and have placed that in parent corresponding to that company only. I am not getting from where to start. Please share your ideas. And i am looking to do this in LINQ using C#

    Read the article

  • How to have multiple tables with multiple joins

    - by williamsdb
    I have three tables that I need to join together and get a combination of results. I have tried using left/right joins but they don't give the desired results. For example: Table 1 - STAFF id name 1 John 2 Fred Table 2 - STAFFMOBILERIGHTS id staffid mobilerightsid rights --this table is empty-- Table 3 - MOBILERIGHTS id rightname 1 Login 2 View and what I need is this as the result... id name id staffid mobilerightsid rights id rightname 1 John null null null null 1 login 1 John null null null null 2 View 2 Fred null null null null 1 login 2 Fred null null null null 2 View I have tried the following : SELECT * FROM STAFFMOBILERIGHTS SMR RIGHT JOIN STAFF STA ON STA.STAFFID = SMR.STAFFID RIGHT JOIN MOBILERIGHTS MRI ON MRI.ID = SMR.MOBILERIGHTSID But this only returns two rows as follows: id name id staffid mobilerightsid rights id rightname null null null null null null 1 login null null null null null null 2 View Can what I am trying to achieve be done and if so how? Thanks

    Read the article

  • using "IS" is better or checking for "NOT NULL"

    - by BDotA
    In C#.NET language: This style of coding is recommended or the one below it? if (sheet.Models.Data is GroupDataModel) { GroupDataModel gdm = (GroupDataModel)sheet.Models.Data; Group group = gdm.GetGroup(sheet.ActiveCell.Row.Index); if (group!=null && controller != null) { controller.CheckApplicationState(); } } or this one: var gdm = sheet.Models.Data as GroupDataModel; if (gdm != null) { Group group = gdm.GetGroup(sheet.ActiveCell.Row.Index); if (@group!=null && controller != null) { controller.CheckApplicationState(); } }

    Read the article

  • Is it a bad idea if equals(null) throws NullPointerException instead?

    - by polygenelubricants
    The contract of equals with regards to null, is as follows: For any non-null reference value x, x.equals(null) should return false. This is rather peculiar, because if o1 != null and o2 == null, then we have: o1.equals(o2) // returns false o2.equals(o1) // throws NullPointerException The fact that o2.equals(o1) throws NullPointerException is a good thing, because it alerts us of programmer error. And yet, that error would not be catched if for various reasons we just switched it around to o1.equals(o2), which would just "silently fail" instead. So the questions are: Why is it a good idea that o1.equals(o2) should return false instead of throwing NullPointerException? Would it be a bad idea if wherever possible we rewrite the contract so that anyObject.equals(null) always throw NullPointerException instead?

    Read the article

  • How to index a date column with null values?

    - by Heinz Z.
    How should I index a date column when some rows has null values? We have to select rows between a date range and rows with null dates. We use Oracle 9.2 and higher. Options I found Using a bitmap index on the date column Using an index on date column and an index on a state field which value is 1 when the date is null Using an index on date column and an other granted not null column My thoughts to the options are: to 1: the table have to many different values to use an bitmap index to 2: I have to add an field only for this purpose and to change the query when I want to retrieve the null date rows to 3: locks tricky to add an field to an index which is not really needed What is the best practice for this case? Thanks in advance Some infos I have read: Oracle Date Index When does Oracle index null column values?

    Read the article

  • How to get the first non-null value in Java?

    - by froadie
    Is there a Java equivalent of SQL's COALESCE function? That is, is there any way to return the first non-null value of several variables? e.g. Double a = null; Double b = 4.4; Double c = null; I want to somehow have a statement that will return the first non-null value of a, b, and c - in this case, it would return b, or 4.4. (Something like the sql method - return COALESCE(a,b,c)). I know that I can do it explicitly with something like: return a != null ? a : (b != null ? b : c) But I wondered if there was any built-in, accepted function to accomplish this.

    Read the article

  • Find all those columns which have only null values, in a MySQL table

    - by Robin v. G.
    The situation is as follows: I have a substantial number of tables, with each a substantial number of columns. I need to deal with this old and to-be-deprecated database for a new system, and I'm looking for a way to eliminate all columns that have - apparently - never been in use. I wanna do this by filtering out all columns that have a value on any given row, leaving me with a set of columns where the value is NULL in all rows. Of course I could manually sort every column descending, but that'd take too long as I'm dealing with loads of tables and columns. I estimate it to be 400 tables with up to 50 (!) columns per table. Is there any way I can get this information from the information_schema? EDIT: Here's an example: column_a column_b column_c column_d NULL NULL NULL 1 NULL 1 NULL 1 NULL 1 NULL NULL NULL NULL NULL NULL The output should be 'column_a' and 'column_c', for being the only columns without any filled in values.

    Read the article

  • What's the Matlab equivalent of NULL, when it's calling COM/ActiveX methods?

    - by David M
    Hi, I maintain a program which can be automated via COM. Generally customers use VBS to do their scripting, but we have a couple of customers who use Matlab's ActiveX support and are having trouble calling COM object methods with a NULL parameter. They've asked how they do this in Matlab - and I've been scouring Mathworks' COM/ActiveX documentation for a day or so now and can't figure it out. Their example code might look something like this: function do_something() OurAppInstance = actxserver('Foo.Application'); OurAppInstance.Method('Hello', NULL) end where NULL is where in another language, we'd write NULL or nil or Nothing, or, of course, pass in an object. The problem is this is optional (and these are implemented as optional parameters in most, but not all, cases) - these methods expect to get NULL quite often. They tell me they've tried [] (which from my reading seemed the most likely) as well as '', Nothing, 'Nothing', None, Null, and 0. I have no idea how many of those are even valid Matlab keywords - certainly none work in this case. Can anyone help? What's Matlab's syntax for a null pointer / object for use as a COM method parameter? Update: Thanks for all the replies so far! Unfortunately, none of the answers seem to work, not even libpointer. The error is the same in all cases: Error: Type mismatch, argument 2 This parameter in the COM type library is described in RIDL as: HRESULT _stdcall OurMethod([in] BSTR strParamOne, [in, optional] OurCoClass* oParamTwo, [out, retval] VARIANT_BOOL* bResult); The coclass in question implements a single interface descending from IDispatch.

    Read the article

  • how to know which special character is there in a file?

    - by Pangea
    My app needs to process text files during a batch process. Occassionally I receive a file with some special character at the end of the file. I am not sure what that special character is. Is there anyway I can find what that character is so that I can tell the other team which is producing that file. I have used mozilla's library to guess the file encoding and it says UTF-8.

    Read the article

  • How could I catch an "Unicode non-character"-warning?

    - by sid_com
    How could I catch the "Unicode non-character 0xffff is illegal for interchange"-warning? #!/usr/bin/env perl use warnings; use 5.012; use Try::Tiny; use warnings FATAL => qw(all); my $character; try { $character = "\x{ffff}"; } catch { die "---------- caught error ----------\n"; }; say "something"; Output: # Unicode non-character 0xffff is illegal for interchange at ./perl1.pl line 11.

    Read the article

  • SPUtility.SendMail and the 2048 Character Limit

    - by Damon
    We were in the middle of testing a web part responsible for gathering information from visitors to our Client's website and emailing it to someone responsible for responding to the request.  During testing, however, it was brought to our attention that the message was cutting off at 2048 characters.  Now, 2048 is one of those numbers that is usually indicative of some computational limit, but I was hopeful that Microsoft had thought through the possibility of emailing more than 2048 characters from SharePoint.  Luckily I was right. and wrong. As it turns out, SPUtility.SendMail is not limited to any specific character limit as far as I can tell.  However, each LINE of text that you send via SendMail cannot exceed 2048 characters.  Since we were sending an HTML email it was constructed entirely without line breaks, far exceeding the 2048 character limit and ultimately helping to educate me about this obscure technical limitation whose only benefit thus far is offering me something to rant about on my blog.  The fix is simple, just put in a carriage return and a line break often enough to avoid going past the 2048 character limit.  I'm sure someone can present a great technical reason for the 2048 character limit, but it seems fairly arbitrary since the "\r\n" that got appended to the string are ultimately just characters too.

    Read the article

  • Was API hooking done as needed for Stuxnet to work? I don't think so

    - by The Kaykay
    Caveat: I am a political science student and I have tried my level best to understand the technicalities; if I still sound naive please overlook that. In the Symantec report on Stuxnet, the authors say that once the worm infects the 32-bit Windows computer which has a WINCC setup on it, Stuxnet does many things and that it specifically hooks the function CreateFileA(). This function is the route which the worm uses to actually infect the .s7p project files that are used to program the PLCs. ie when the PLC programmer opens a file with .s7p the control transfers to the hooked function CreateFileA_hook() instead of CreateFileA(). Once Stuxnet gains the control it covertly inserts code blocks into the PLC without the programmers knowledge and hides it from his view. However, it should be noted that there is also one more function called CreateFileW() which does the same task as CreateFileA() but both work on different character sets. CreateFileA works with ASCII character set and CreateFileW works with wide characters or Unicode character set. Farsi (the language of the Iranians) is a language that needs unicode character set and not ASCII Characters. I'm assuming that the developers of any famous commercial software (for ex. WinCC) that will be sold in many countries will take 'Localization' and/or 'Internationalization' into consideration while it is being developed in order to make the product fail-safe ie. the software developers would use UNICODE while compiling their code and not just 'ASCII'. Thus, I think that CreateFileW() would have been invoked on a WINCC system in Iran instead of CreateFileA(). Do you agree? My question is: If Stuxnet has hooked only the function CreateFileA() then based on the above assumption there is a significant chance that it did not work at all? I think my doubt will get clarified if: my assumption is proved wrong, or the Symantec report is proved incorrect. Please help me clarify this doubt. Note: I had posted this question on the general stackexchange website and did not get appropriate responses that I was looking for so I'm posting it here.

    Read the article

  • Character Jump Control

    - by Abdullah Sorathia
    I would like to know how can I control the jump movement of a character in Unity3D. Basically I am trying to program the jump in such a way that while a jump is in progress the character is allowed to move either left or right in mid-air when the corresponding keys are pressed. With my script the character will correctly move to the left when, for example, the left key is pressed, but when the right key is pressed afterwards, the character moves to the right before the movement to the left is completed. Following is the script: void Update () { if(touchingPlatform && Input.GetButtonDown("Jump")){ rigidbody.AddForce(jumpVelocity, ForceMode.VelocityChange); touchingPlatform = false; isJump=true; } //left & right movement Vector3 moveDir = Vector3.zero; if(Input.GetKey ("right")||Input.GetKey ("left")){ moveDir.x = Input.GetAxis("Horizontal"); // get result of AD keys in X if(ShipCurrentSpeed==0) { transform.position += moveDir * 3f * Time.deltaTime; }else if(ShipCurrentSpeed<=15) { transform.position += moveDir * ShipCurrentSpeed * 2f * Time.deltaTime; }else { transform.position += moveDir * 30f * Time.deltaTime; } }

    Read the article

< Previous Page | 9 10 11 12 13 14 15 16 17 18 19 20  | Next Page >