Search Results

Search found 959 results on 39 pages for 'george kas'.

Page 23/39 | < Previous Page | 19 20 21 22 23 24 25 26 27 28 29 30  | Next Page >

  • No transperancy in Bitmap loading from MemoryStream

    - by Jogi Joseph George
    Please see the C# code. When i am writing a Bitmap to a file and read from the file, i am getting the transperancy correctly. using (Bitmap bmp = new Bitmap(2, 2)) { Color col = Color.FromArgb(1, 2, 3, 4); bmp.SetPixel(0, 0, col); bmp.Save("J.bmp"); } using (Bitmap bmp = new Bitmap("J.bmp")) { Color col = bmp.GetPixel(0, 0); // ------------------------------ // Here col.A is 1. This is right. // ------------------------------ } But if I write the Bitmap to a MemoryStream and read from that MemoryStream, the transperancy has been removed. All Alpha values become 255. MemoryStream ms = new MemoryStream(); using (Bitmap bmp = new Bitmap(2, 2)) { Color col = Color.FromArgb(1, 2, 3, 4); bmp.SetPixel(0, 0, col); bmp.Save(ms, ImageFormat.Bmp); } using (Bitmap bmp = new Bitmap(ms)) { Color col = bmp.GetPixel(0, 0); // ------------------------------ // But here col.A is 255. Why? i am expecting 1 here. // ------------------------------ } I wish to save the Bitmap to a MemoryStream and read it back with transperancy. Could you please help me?

    Read the article

  • plot 3D and combine in matlab

    - by George
    Hello ,i have this matrix "experiment=2*rand(npoints,3)-1". I want to plot in in 3D,so i use "mesh(experiment)". How can i take red points in my plot? Also,i want to implement in the above plot , a sphere with radius 1 at 0,0,0. I did : mesh(experiment) hold on [x,y,z]=sphere; r=1; mesh(r*x,r*y,r*z) hold off but 1) i am not taking radius 1 2) the figures just showing in the same graph but don't combine Thanks

    Read the article

  • Poll: Require Semicolons and Forbid Tables?

    - by George Bailey
    There are a few very serious but opinionated and subjective arguments that I know of. Two of them are Whether or not to use semicolons in the event they are optional. There is a vote as here that also includes reasons Whether or not to use tables for non tabular data. There more information here Since the semicolon question arises often in JavaScript and the tables thing in HTML then there are probably many who run into both. I sort of expect a person who is strict with semicolons also to be strict about avoiding tables. I will post four CW answers here to vote on. Please vote what you think is right. If you want to talk about the reasons then please use Semicolons: Do you recommend using semicolons after every statement in JavaScript? Tables: Start your own question under the polls tag and follow the design of the semicolons question.

    Read the article

  • I have VS2010 Ultimate. Shouldn't TFS Server be included?

    - by George
    Dumb question I'm sure, but when I log onto my MSDN subscription account, I don't see Team Foundation Server in the list of available for download software application. I thought it was supposed to come with VS2010 Ultimate, which I could download. Is it a separate download? Could it be that my MSDN account level gives me access to VS2010 but that I am still not entitled to TFS? I'd like to install it instead of using VSS.

    Read the article

  • Why would an error get thrown inside my try-catch?

    - by George Johnston
    Why would my try-catch block still be throwing an error when it's handled? Exception Details: System.NullReferenceException: Object reference not set to an instance of an object. Try Here >> : _MemoryStream.Seek(6 * StartOffset, 0) _MemoryStream.Read(_Buffer, 0, 6) Catch ex As IOException // Handle Error End Try Edit: Cleaned the question up to remove the extraneous information.

    Read the article

  • Problems with character encoding in ASP.NET MVC

    - by George
    Hello experts! I'm having a weird issue here. I have a bunch of Views, in which I have characters like this: é, á, ó, etc. In one of my Views, I can fetch data from the database with accents just fine, but in another one I simply get the "weird" characters. What can i be doing wrong? Do I need to configure something in order to this work? Thanks!

    Read the article

  • Problem Passing Variable to Submit Form in Firefox

    - by George
    In the following example, I have a link that sends a variable to a function which checks if the variable is true and, if so, submits a form on the page. This has been tested and works in IE, Safari, and Chrome, but not Firefox. Trying to figure out what's wrong in Firefox. The function which checks 'action' and then submits form 'login' : function submit(action) { if (action == "submit") { document.login.submit(); } } Link to pass action variable and submit form: <a href="javascript:submit('submit');">SEND FORM</a> When I remove the check and just have the following, it works fine in Firefox: function submit() { document.login.submit(); } <a href="javascript:submit();">SEND FORM</a>

    Read the article

  • Business Objects Web Intelligence-style reporting in a Winform app. Is this possible?

    - by George
    I have a WinForm app that displays results in a Gridview control. If a user right mouse clicks on a row, he can then, from a popup menu, select a command to perform on the row much like windows File Explorer. But now I want to be able to give the user the ability to construct a filter so that he can control which rows are displayed in the grid w/o effecting the functionality of the application. I would also like the user to be able to select the columns/fields that he sees in the grid. For the basis of this question, let's assume that the data displayed in grid comes from a single table. business Objects' Web Intelligence and Desktop Intelligence applications give me very flexible and powerful reporting capabilities, but I want to integrate this capability into my WinForm application. Does Business Objects, or maybe Crystal Reports provide this sort of functionality? I can construct my own query builder but I'd rather not reinvent sliced bread.

    Read the article

  • Vertical text alignment in Crystal Reports?

    - by George Mauer
    In the Crystal Reports editor that comes with Visual Studio (2008) is it possible to align text to the center of a text box rather than to the top? I can't find the option anywhere and a Google search is not encouraging but I just can't bring myself to believe that they would not include such an obvious feature.

    Read the article

  • How to force a line break in a loooooong word in a DIV?

    - by George Edison
    Okay, this is really confusing me. I have some content inside of a div like so: <div style="background-color: green; width: 200px; height: 300px;"> Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest.Thisisatest. </div> However, the content overflows the DIV (as expected) because the 'word' is too long. How can I force the browser to 'break' the word where necessary to fit all of the content inside?

    Read the article

  • How to convert List<int> to string[]?

    - by George Edison
    I need an easy way to convert a List<int> to a string array. I have: var the_list = new List<int>(); the_list.Add(1); the_list.Add(2); the_list.Add(3); string[] the_array = new string[the_list.Count]; for(var i = 0 ; i < the_array.Count; ++i) the_array[i] = the_list[i].ToString(); ...which looks to be very ugly to me. Is there an easier way? Note: I'm looking for an easier way - not necessarily a faster way.

    Read the article

  • Get value of element in Multi-Dimensional Array

    - by George
    Here is my foreach loop to get at the values from a multi-dimensional array $_coloredvariables = get_post_meta( $post->ID, '_coloredvariables', true ); foreach ($_coloredvariables as $key => $value) { var_dump($value); } Which outputs this: array 'label' => string 'Color' (length=5) 'size' => string 'small' (length=5) 'displaytype' => string 'square' (length=6) 'values' => array 'dark-night-angel' => array 'type' => string 'Image' (length=5) 'color' => string '#2c4065' (length=7) 'image' => string '' (length=0) 'forest-green' => array 'type' => string 'Color' (length=5) 'color' => string '#285d5f' (length=7) 'image' => string '' (length=0) 'voilet' => array 'type' => string 'Color' (length=5) 'color' => string '#6539c9' (length=7) 'image' => string '' (length=0) 'canary-yellow' => array 'type' => string 'Color' (length=5) 'color' => string 'grey' (length=4) 'image' => string '' (length=0) And then to only get the values array I can do this: foreach ($_coloredvariables as $key => $value) { var_dump($value['values']); } which outputs this: array 'dark-night-angel' => array 'type' => string 'Image' (length=5) 'color' => string '#2c4065' (length=7) 'image' => string '' (length=0) 'forest-green' => array 'type' => string 'Color' (length=5) 'color' => string '#285d5f' (length=7) 'image' => string '' (length=0) 'voilet' => array 'type' => string 'Color' (length=5) 'color' => string '#6539c9' (length=7) 'image' => string '' (length=0) 'canary-yellow' => array 'type' => string 'Color' (length=5) 'color' => string 'grey' (length=4) 'image' => string '' (length=0) What I can't figure out is how to get these elements in the array structure "dark-night-angel", "forest-green", "voilet", "canary-yellow" Without using specific names: var_dump($value['values']['dark-night-angel']) Something that is more dynamic, of course this doesn't work: var_dump($value['values'][0][0]); thanks

    Read the article

  • Combining JSON Arrays

    - by George
    I have 3 json arrays, each with information listed in the same format: Array: ID: NAME: DATA: ID: NAME: DATA: etc... My goal is to combine all 3 arrays into one array, and sort and display by NAME by passing the 3 arrays into a function. The function I've tried is: JSCRIPT Call: // to save time I'm just passing the name of the array, I've tried passing // the full array name as json[0]['DATA'][array_1][0]['NAME'] as well. combineNames(['array_1','array_2']); FUNCTION: function combineNames(names) { var allNames = [] for (i=0;i<names.length;i++) { for (j=0;j<json[0]['DATA'][names[i]].length;j++) { allNames.push(json[0]['DATA'][names[i]][j]['NAME']); } } return allNames.sort(); } The above gives me the error that NAME is null or undefined. I've also tried using the array.concat function which works when I hard code it: var names = []; var allNames = []; var names = names.concat(json[0]['DATA']['array_1'],json[0]['DATA']['array_2']); for (i=0;i<names.length;i++) { allNames.push(names[i]['NAME']); } return allNames.sort(); But I can't figure out how to pass in the arrays into the function (and if possible I would like to just pass in the array name part instead of the whole json[0]['DATA']['array_name'] like I was trying to do in the first function...

    Read the article

  • How do you indent *every* line of a <span> element?

    - by George Edison
    I have the following HTML chunk: <span class='instruction_text'> Line 1<br> Line 2 </span> And the CSS declaration of instruction_text is: .instruction_text { margin-left: 70px; font-style: italic; color: #555; } The first line has a 70px margin as expected, but the next line starts with no indent. How can I make ALL of the lines indented?

    Read the article

  • How to display a status message in the Gnome panel?

    - by George Edison
    I have a Gnome applet I've been working on. It is written in Python and it displays the progress of something in a small label. My question is: what is the best way to display status notifications to the user? On Ubuntu, I notice that whenever I connect to a network or adjust the volume, a black box appears in the upper-right corner. Is there a way to do something like that with Python?

    Read the article

  • Stored procedure optimization

    - by George Zacharia
    Hi, i have a stored procedure which takes lot of time to execure .Can any one suggest a better approch so that the same result set is achived. ALTER PROCEDURE [dbo].[spFavoriteRecipesGET] @USERID INT, @PAGENUMBER INT, @PAGESIZE INT, @SORTDIRECTION VARCHAR(4), @SORTORDER VARCHAR(4),@FILTERBY INT AS BEGIN DECLARE @ROW_START INT DECLARE @ROW_END INT SET @ROW_START = (@PageNumber-1)* @PageSize+1 SET @ROW_END = @PageNumber*@PageSize DECLARE @RecipeCount INT DECLARE @RESULT_SET_TABLE TABLE ( Id INT NOT NULL IDENTITY(1,1), FavoriteRecipeId INT, RecipeId INT, DateAdded DATETIME, Title NVARCHAR(255), UrlFriendlyTitle NVARCHAR(250), [Description] NVARCHAR(MAX), AverageRatingId FLOAT, SubmittedById INT, SubmittedBy VARCHAR(250), RecipeStateId INT, RecipeRatingId INT, ReviewCount INT, TweaksCount INT, PhotoCount INT, ImageName NVARCHAR(50) ) INSERT INTO @RESULT_SET_TABLE SELECT FavoriteRecipes.FavoriteRecipeId, Recipes.RecipeId, FavoriteRecipes.DateAdded, Recipes.Title, Recipes.UrlFriendlyTitle, Recipes.[Description], Recipes.AverageRatingId, Recipes.SubmittedById, COALESCE(users.DisplayName,users.UserName,Recipes.SubmittedBy) As SubmittedBy, Recipes.RecipeStateId, RecipeReviews.RecipeRatingId, COUNT(RecipeReviews.Review), COUNT(RecipeTweaks.Tweak), COUNT(Photos.PhotoId), dbo.udfGetRecipePhoto(Recipes.RecipeId) AS ImageName FROM FavoriteRecipes INNER JOIN Recipes ON FavoriteRecipes.RecipeId=Recipes.RecipeId AND Recipes.RecipeStateId <> 3 LEFT OUTER JOIN RecipeReviews ON RecipeReviews.RecipeId=Recipes.RecipeId AND RecipeReviews.ReviewedById=@UserId AND RecipeReviews.RecipeRatingId= ( SELECT MAX(RecipeReviews.RecipeRatingId) FROM RecipeReviews WHERE RecipeReviews.ReviewedById=@UserId AND RecipeReviews.RecipeId=FavoriteRecipes.RecipeId ) OR RecipeReviews.RecipeRatingId IS NULL LEFT OUTER JOIN RecipeTweaks ON RecipeTweaks.RecipeId = Recipes.RecipeId AND RecipeTweaks.TweakedById= @UserId LEFT OUTER JOIN Photos ON Photos.RecipeId = Recipes.RecipeId AND Photos.UploadedById = @UserId AND Photos.RecipeId = FavoriteRecipes.RecipeId AND Photos.PhotoTypeId = 1 LEFT OUTER JOIN users ON Recipes.SubmittedById = users.UserId WHERE FavoriteRecipes.UserId=@UserId GROUP BY FavoriteRecipes.FavoriteRecipeId, Recipes.RecipeId, FavoriteRecipes.DateAdded, Recipes.Title, Recipes.UrlFriendlyTitle, Recipes.[Description], Recipes.AverageRatingId, Recipes.SubmittedById, Recipes.SubmittedBy, Recipes.RecipeStateId, RecipeReviews.RecipeRatingId, users.DisplayName, users.UserName, Recipes.SubmittedBy; WITH SortResults AS ( SELECT ROW_NUMBER() OVER ( ORDER BY CASE WHEN @SORTDIRECTION = 't' AND @SORTORDER='a' THEN TITLE END ASC, CASE WHEN @SORTDIRECTION = 't' AND @SORTORDER='d' THEN TITLE END DESC, CASE WHEN @SORTDIRECTION = 'r' AND @SORTORDER='a' THEN AverageRatingId END ASC, CASE WHEN @SORTDIRECTION = 'r' AND @SORTORDER='d' THEN AverageRatingId END DESC, CASE WHEN @SORTDIRECTION = 'mr' AND @SORTORDER='a' THEN RecipeRatingId END ASC, CASE WHEN @SORTDIRECTION = 'mr' AND @SORTORDER='d' THEN RecipeRatingId END DESC, CASE WHEN @SORTDIRECTION = 'd' AND @SORTORDER='a' THEN DateAdded END ASC, CASE WHEN @SORTDIRECTION = 'd' AND @SORTORDER='d' THEN DateAdded END DESC ) RowNumber, FavoriteRecipeId, RecipeId, DateAdded, Title, UrlFriendlyTitle, [Description], AverageRatingId, SubmittedById, SubmittedBy, RecipeStateId, RecipeRatingId, ReviewCount, TweaksCount, PhotoCount, ImageName FROM @RESULT_SET_TABLE WHERE ((@FILTERBY = 1 AND SubmittedById= @USERID) OR ( @FILTERBY = 2 AND (SubmittedById <> @USERID OR SubmittedById IS NULL)) OR ( @FILTERBY <> 1 AND @FILTERBY <> 2)) ) SELECT RowNumber, FavoriteRecipeId, RecipeId, DateAdded, Title, UrlFriendlyTitle, [Description], AverageRatingId, SubmittedById, SubmittedBy, RecipeStateId, RecipeRatingId, ReviewCount, TweaksCount, PhotoCount, ImageName FROM SortResults WHERE RowNumber BETWEEN @ROW_START AND @ROW_END print @ROW_START print @ROW_END SELECT @RecipeCount=dbo.udfGetFavRecipesCount(@UserId) SELECT @RecipeCount AS RecipeCount SELECT COUNT(Id) as FilterCount FROM @RESULT_SET_TABLE WHERE ((@FILTERBY = 1 AND SubmittedById= @USERID) OR (@FILTERBY = 2 AND (SubmittedById <> @USERID OR SubmittedById IS NULL)) OR (@FILTERBY <> 1 AND @FILTERBY <> 2)) END

    Read the article

  • How to search multiple columns in MySQL?

    - by George
    I'm trying to make a search feature that will search multiple columns to find a keyword based match. This query: SELECT title FROM pages LIKE %$query%; works only for searching one column, I noticed separating column names with commas results in an error. So is it possible to search multiple columns in mysql?

    Read the article

  • How does this RegEx for parsing emails work in PHP?

    - by George Edison
    Okay, I have the following PHP code to extract an email address of the following two forms: Random Stranger <[email protected]> [email protected] Here is the PHP code: // The first example $sender = "Random Stranger <[email protected]>"; $pattern = '/([\w_-]*@[\w-\.]*)|.*<([\w_-]*@[\w-\.]*)>/'; preg_match($pattern,$sender,$matches,PREG_OFFSET_CAPTURE); echo "<pre>"; print_r($matches); echo "</pre><hr>"; // The second example $sender = "[email protected]"; preg_match($pattern,$sender,$matches,PREG_OFFSET_CAPTURE); echo "<pre>"; print_r($matches); echo "</pre>"; My question is... what is in $matches? It seems to be a strange collection of arrays. Which index holds the match from the parenthesis? How can I be sure I'm getting the email address and only the email address? Update: Here is the output: Array ( [0] => Array ( [0] => Random Stranger [1] => 0 ) [1] => Array ( [0] => [1] => -1 ) [2] => Array ( [0] => [email protected] [1] => 5 ) ) Array ( [0] => Array ( [0] => [email protected] [1] => 0 ) [1] => Array ( [0] => [email protected] [1] => 0 ) )

    Read the article

  • How do I trigger specific parts of a storyboard in WPF?

    - by George
    I have several grids in my window. I have created a storyboard that moves them left by x pixels when a button is clicked. I want to make it so that when the button is clicked again those grids move another x pixels, however I'm unable to find out how to do this as it's not a common task on tutorials. I have tried creating a second storyboard to do this, however that won't work as then the grids will be back at their starting positions. One solution might be to create a third set of keyframes after the first two sets, and somehow pause the animation when it gets there, and resumes it again when the button is clicked, however I'm not sure how to pause a storyboard when it reaches a keyframe. This would also make reversing the grids difficult (using this approach http://social.msdn.microsoft.com/forums/en-US/wpf/thread/ac54de71-f750-4940-91a2-231810308727/), as I'd like to make another button make the grids go the other way.

    Read the article

  • JQuery Ajax Get passing parameters

    - by George
    Hi, I am working on my first MVC application and am running into a bit of a problem. I have a data table that when a row is clicked, I want to return the detail from that row. I have a function set up as: function rowClick(item) { $("#detailInfo").data("width.dialog", 800); $.ajax({ type: "GET", contentType: "application/json; charset=utf-8", url: "<%= Url.Action("GetDetails", "WarningRecognition")%>", data: "", dataType: "json", success: function(data) {//do some stuff...and show results} } The problem I am running into is the passing of the "item". I calls the Controller function that looks like this: public JsonResult GetDetails(string sDetail) { Debug.WriteLine(Request.QueryString["sDetail"]); Debug.WriteLine("sDetail: " + sDetail); var myDetailsDao = new WarnRecogDetailsDao(); return new JsonResult { Data = myDetailsDao.SelectDetailedInfo(Convert.ToInt32(sDetail)) }; } But it never shows anything as the the "sDetail". It does hit the function but nothing is passed to it. So, I have read where you pass the parameter via the data but I have tried every combination I can think of and it never shows up. Tried: data: {"item"} data: {sDetail[item]} data: {sDetail[" + item + "]} Any help is greatly appreciated. Thanks in advance. Geo...

    Read the article

  • best mobile phone for development

    - by George Glass
    I'm about to get a new job (unrelated to programming) where there's a lot of downtime. I'd like to get a mobile phone that I can stealthfully use to do some web development on. Basically editing and uploading php files. Can anybody reccomend an phone suited to this purpose?

    Read the article

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