Search Results

Search found 87 results on 4 pages for 'bm'.

Page 1/4 | 1 2 3 4  | Next Page >

  • BizTalk - Removing BAM Activities and Views using bm.exe

    - by Stuart Brierley
    Originally posted on: http://geekswithblogs.net/StuartBrierley/archive/2013/10/16/biztalk---removing-bam-activities-and-views-using-bm.exe.aspxOn the project I am currently working on, we are making quite extensive use of BAM within our growing number of BizTalk applications, all of which are being deployed and undeployed using the excellent Deployment Framework for BizTalk 5.0.Recently I had an issue where problems on the build server had left the target development servers in a state where the BAM activities and views for a particular application were not being removed by the undeploy process and unfortunately the definition in the solution had changed meaning that I could not easily recreate the file from source control.  To get around this I used the bm.exe application from the command line to manually remove the problem BAM artifacts - bm.exe can be found at the following path:C:\Program Files (x86)\Microsoft BizTalk Server 2010\TrackingC:\Program Files (x86)\Microsoft BizTalk Server 2010\TrackingStep1 :Get the BAM Definition FileRun the following command to get the BAm definition file, containing the details of all the activities, views and alerts:bm.exe get-defxml -FileName:{Path and File Name Here}.xmlStep 2: Remove the BAM ArtifactsAt this stage I chose to manually remove each of my problem BAM activities and views using seperate command line calls.  By looking in the definition file I could see the names of the activities and views that I wanted to remove and then use the following commands to remove first the views and then the activities:bm.exe remove-view -name:{viewname}bm.exe remove-activity -name:{activityname}

    Read the article

  • What IDE to use for Python

    - by husayt
    As a Python newbie, it is interesting to know what IDE's ("GUIs/editors") others use for Python coding. If you can just give the name (e.g. Textpad, Eclipse ..) that will be enough. If it is already mentioned, you can just vote for it. But if you can also give some more comparative information, that will be much appreciated. Thanks. Update: Results so far PyDev with Eclipse (CP, F, AC, PD, EM, SI, MLS, UML, SC, UT, LN, CF, BM) Komodo (CP, C/F, MLS, PD, AC, SC, SI, BM, LN, CF, CT) Emacs (CP, F, AC, MLS, PD, EM, SC, SI, BM, LN, CF, CT, UT, UML) Vim (CP, F, AC, MLS, SI, BM, LN, CF ) TextMate (Mac, CT, CF, MLS, SI, BM, LN) Gedit (Linux, F, AC, MLS, BM, LN, CT [sort of]) Idle (CP, F, AC) PIDA (Linux, CP, F, AC, MLS, SI, BM, LN, CF)(VIM Based) NotePad++ (Windows) BlueFish (Linux) JEdit (CP, F, BM, LN, CF, MLS) E-Texteditor (TextMate Clone for Windows) WingIde (CP, C, AC, MLS (support for C), PD, EM, SC, SI, BM, LN, CF, CT, UT) Eric Ide (CP, F, AC, PD, EM, SI, LN, CF, UT) Pyscripter (Windows, F, AC, PD, EM, SI, LN, CT, UT) ConTEXT (Windows, C) SPE (F, AC, UML) SciTE (CP, F, MLS, EM, BM, LN, CF, CT, SH) Zeus (W, C, BM, LN, CF, SI, SC, CT) NetBeans (CP, F, PD, UML, AC, MLS, SC, SI, BM, LN, CF, CT, UT, RAD) DABO (CP) BlackAdder (C, CP, CF, SI) PythonWin (W, F, AC, PD, SI, BM, CF) Geany (CP, F, very limited AC, MLS, SI, BM, LN, CF) UliPad (CP, F, AC, PD, MLS, SI, LI, CT, UT, BM) Boa Constructor (CP, F, AC, PD, EM, SI, BM, LN, UML, CF, CT) ScriptDev (W, C, AC, MLS, PD, EM, SI, BM, LN, CF, CT) Spider (CP, F, AC) Editra (CP, F, AC, MLS, SC, SI, BM, LN, CF) Pfaide (Windows, C, AC, MLS, SI, BM, LN, CF, CT) KDevelop (CP, F, MLS, SC, SI, BM, LN, CF) Acronyms used: CP - Cross Platfom C - Commercial F - Free AC - Automatic Code-completion MLS - Multi-Language Support PD - Integrated Python Debugging EM - ErrorMarkup SC - Source Control integration SI - Smart Indent BM - Bracket Matching LN - Line Numbering UML - UML editing / viewing CF - Code Folding CT - Code Templates UT - Unit Testing UID - Gui Designer (e.g. QT, Eric, ..) DB - integrated database support RAD - Rapid app development support I don't mention basics like Syntax highlighting as I expect these by default. This is a just dry list reflecting your feedback and comments, I am not advocating any of these tools. I will keep updating this list as you keep posting your answers. PS. Can you help me to add features of the above editors to the list (like autocomplete, debugging, or etc)?

    Read the article

  • bm.el is broken.

    - by maindoor
    Is anyone using bm.el to traverse through bookmarks in multiple buffers ? If so did you notice that bm-next is broken ? I see several people using it but no one seems to have noticed this. The buggy version got into emacs-goodies as well. How do I go about debugging this ?

    Read the article

  • If I replace an image in a PictureBox control, should I dispose the original image first? .Net Winfo

    - by Jules
    Following on from my question here http://stackoverflow.com/questions/2548664/long-overdue-for-me-question-about-disposing-managed-objects-in-net-vb-net , If I replace an image in a picture box, should I dispose the original image first? Or, what about this situation: Dim bm As New Bitmap(32,32) bm = New Bitmap(32,32) bm = New Bitmap(32,32) bm = New Bitmap(32,32) Does bm need only to be disposed at the end, or should it be disposed before each re-creation?

    Read the article

  • Can we use png instead bitmap in GDI for bitblt ?

    - by nXqd
    HDC hdcMem = CreateCompatibleDC(hdc); HBITMAP hbmOld = SelectObject(hdcMem, g_hbmBall); GetObject(g_hbmBall, sizeof(bm), &bm); BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, hdcMem, 0, 0, SRCCOPY); I've found that many games use bitmap for displaying animation . But can we use png instead ? Because bitmap is quite big when i convert fron png ( 1kb - 12kb in bitmap ) Thanks for reading this :)

    Read the article

  • OutOfMemoryError: bitmap size exceeds VM budget :- Android

    - by Shalini Singh
    Hi! i am downloading images from Url and displaying them,,, at the downloading time it is giving "out of memory error : bitmap size exceeds VM budget" i am using drawable ... code is giving bellow: HttpClient httpclient= new DefaultHttpClient(); HttpResponse response=(HttpResponse)httpclient.execute(httpRequest); HttpEntity entity= response.getEntity(); BufferedHttpEntity bufHttpEntity=new BufferedHttpEntity(entity); InputStream instream = bufHttpEntity.getContent(); Bitmap bm = BitmapFactory.decodeStream(instream);` Bitmap useThisBitmap = Bitmap.createScaledBitmap(bm,bm.getWidth(),bm.getHeight(), true); bm.recycle(); BitmapDrawable bt= new BitmapDrawable(useThisBitmap); System.gc(); Error: 05-28 14:55:47.251: ERROR/AndroidRuntime(4188): java.lang.OutOfMemoryError: bitmap size exceeds VM budget Please help me,,,,

    Read the article

  • DrawImage - unwanted resized

    - by nXqd
    I've implemented GDI+ Drawing, but I really don't know why it's resize unwanted :) case WM_PAINT: { hdc = BeginPaint(hWnd, &ps); Graphics g(hdc); Bitmap* bm; bm = new Bitmap(L"1.png"); g.DrawImage(bm,0,0); g.DrawImage(bm,0,100,126,36); g.DrawImage(bm,0,200,0,0,126,36,UnitPixel); // TODO: Add any drawing code here... EndPaint(hWnd, &ps); break; } the second sprite is the one I want , but I must use the third overload of DrawImage to draw one image.

    Read the article

  • Cast Graphics to Image in C#

    - by WebDevHobo
    I have a pictureBox on a Windows Form. I do the following to load a PNG file into it. Bitmap bm = (Bitmap)Image.FromFile("Image.PNG", true); Bitmap tmp; public Form1() { InitializeComponent(); this.tmp = new Bitmap(bm.Width, bm.Height); } private void pictureBox1_Paint(object sender, PaintEventArgs e) { e.Graphics.DrawImage(this.bm, new Rectangle(0, 0, tmp.Width, tmp.Height), 0, 0, tmp.Width, tmp.Height, GraphicsUnit.Pixel); } However, I need to draw things on the image and then have the result displayed again. Drawing rectangles can only be done via the Graphics class. I'd need to draw the needed rectangles on the image, make it an instance of the Image class again and save that to this.bm I can add a button that executes this.pictureBox1.Refresh();, forcing the pictureBox to be painted again, but I can't cast Graphics to Image. Because of that, I can't save the edits to the this.bm bitmap. That's my problem, and I see no way out.

    Read the article

  • Android: problem retrieving bitmap from database

    - by Addy
    When I'm retrieving image from the sqlite database my Bitmap object bm return null value can any one help me..? I found problem in my database.. When I store the byte array in blob data type in database table that time the size of the byte array was 2280.. But when i retrieved that blob data type using select query I get the byte array within size 12. My code is: // Inserting data in database byte[] b; ByteArrayOutputStream baos = new ByteArrayOutputStream(); Bitmap bm = BitmapFactory.decodeResource(getResources(),R.drawable.icon); bm.compress(Bitmap.CompressFormat.PNG, 100, baos); //bm is the bitmap object b = baos.toByteArray(); //here b size is 2280 baos.close(); try { mDB = this.openOrCreateDatabase(MY_DATABASE_NAME, MODE_PRIVATE, null); mDB.execSQL("CREATE TABLE IF NOT EXISTS " + MY_DATABASE_TABLE + " (PICTURE BLOB);"); mDB.execSQL("INSERT INTO " + MY_DATABASE_TABLE + " (PICTURE)" + " VALUES ('"+b+"');"); } catch(Exception e) { Log.e("Error", "Error", e); } finally { if(mDB != null) mDB.close(); } // Retriving data from database byte[] b1; Bitmap bm; mDB = this.openOrCreateDatabase(MY_DATABASE_NAME, MODE_PRIVATE, null); try { mDB.execSQL("CREATE TABLE IF NOT EXISTS " + MY_DATABASE_TABLE + " (PICTURE BLOB);"); Cursor c = mDB.rawQuery("SELECT * FROM " + MY_DATABASE_TABLE + ";", null); c.moveToFirst(); if (c != null) { do { b1=c.getBlob(0)); //here b1 size is 12 bm=BitmapFactory.decodeByteArray(b1, 0, b1.length); }while(c.moveToNext()); }

    Read the article

  • Limiting and redirect port access with useragent

    - by linuxcore
    I'm trying to write iptables string match rule To block http://domain.com:8888 and https://domain.com:8888 when it matches the supplied string in the rule. And another rule to redirect the ports also from 8888 to 7777 I tried following rules but unfortunately didn't work iptables -A INPUT -p tcp -s 0.0.0.0/0 -m string --string linuxcore --algo bm --sport 8888 -j DROP iptables -t raw -A PREROUTING -m string --algo bm --string linuxcore -p tcp -i eth0 --dport 8888 -j DROP iptables -t nat -A PREROUTING -p tcp --dport 8888 -m string --algo bm --string "linuxcore" -j REDIRECT --to-port 7777 iptables -A INPUT -t nat -p tcp --dport 8888 -m string --algo bm --string "linuxcore" -j DROP I want to do this from iptables not the webserver because the server may not have a webserver and those ports are working on internal proxy or something like ..etc

    Read the article

  • how can convert bitmap to byte array

    - by narasimha
    hi sir i am implementing image upload in sdcard image converting bitmap in bitmap convert in bytearray i am implementing this code import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.EOFException; import java.io.File; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import android.R.array; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.util.Log; import android.widget.ImageView; public class Photo extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); File f = new File("/sdcard/DCIM/1.jpg"); FileInputStream is = null; try { is = new FileInputStream(f); Bitmap bm; bm = BitmapFactory.decodeStream(is,null,null); ByteArrayOutputStream baos = new ByteArrayOutputStream(1000); bm.compress(Bitmap.CompressFormat.JPEG,75, baos); System.out.println("3........................"+bm); ImageView pic=(ImageView)this.findViewById(R.id.picview); pic.setImageBitmap(bm); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } } }this code is i am implementing how can convert bitmap in byte array INFO/System.out(12658): 3........................android.graphics.Bitmap@4358e3d0 in debug this will be displayed how can retrieve bitmap to byte array

    Read the article

  • OutofMemoryError: bitmap size exceeds VM budget (Android)

    - by Chrispix
    Getting an Exception in the BitmapFactory. Not sure what is the issue. (Well I can guess the issue, but not sure why its happening) ERROR/AndroidRuntime(7906): java.lang.OutOfMemoryError: bitmap size exceeds VM budget ERROR/AndroidRuntime(7906): at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:295) My code is pretty straight forward. I defined an XML layout w/ a default image. I try to load a bm on the SDCard (if present - it is). If not it shows the default image. Anyway.. Here is code : public class showpicture extends Activity { public void onCreate(Bundle savedInstanceState) { /** Remove menu/status bar **/ requestWindowFeature(Window.FEATURE_NO_TITLE); final Window win = getWindow(); win.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); Bitmap bm; super.onCreate(savedInstanceState); setContentView(R.layout.showpicture); try { ImageView mImageButton = (ImageView)findViewById(R.id.displayPicture); bm = Bitmap.createScaledBitmap(BitmapFactory.decodeFile("/sdcard/dcim/Camera/20091018203339743.jpg"),100, 100, true); parkImageButton.setImageBitmap(bm); } catch (IllegalArgumentException ex) { Log.d("MYAPP",ex.getMessage()); } catch (IllegalStateException ex) { It fails on the bm=Bitmap.createScaledBitmap any thoughts? I did some research on the forums, and it pointed to this post I just don't know why it is not working. Any help would be great! Thanks, Chris.

    Read the article

  • Greyscale Image from YUV420p data

    - by fergs
    From what I have read on the internet the Y value is the luminance value and can be used to create a grey scale image. The following link: http://www.bobpowell.net/grayscale.htm, has some C# code on working out the luminance of a bitmap image : { Bitmap bm = new Bitmap(source.Width,source.Height); for(int y=0;y<bm.Height;y++) public Bitmap ConvertToGrayscale(Bitmap source) { for(int x=0;x<bm.Width;x++) { Color c=source.GetPixel(x,y); int luma = (int)(c.R*0.3 + c.G*0.59+ c.B*0.11); bm.SetPixel(x,y,Color.FromArgb(luma,luma,luma)); } } return bm; } I have a method that returns the YUV values and have the Y data in a byte array. I have the current piece of code and it is failing on Marshal.Copy – attempted to read or write protected memory. public Bitmap ConvertToGrayscale2(byte[] yuvData, int width, int height) { Bitmap bmp; IntPtr blue = IntPtr.Zero; int inputOffSet = 0; long[] pixels = new long[width * height]; try { for (int y = 0; y < height; y++) { int outputOffSet = y * width; for (int x = 0; x < width; x++) { int grey = yuvData[inputOffSet + x] & 0xff; unchecked { pixels[outputOffSet + x] = UINT_Constant | (grey * INT_Constant); } } inputOffSet += width; } blue = Marshal.AllocCoTaskMem(pixels.Length); Marshal.Copy(pixels, 0, blue, pixels.Length); // fails here : Attempted to read or write protected memory bmp = new Bitmap(width, height, width, PixelFormat.Format24bppRgb, blue); } catch (Exception) { throw; } finally { if (blue != IntPtr.Zero) { Marshal.FreeHGlobal(blue); blue = IntPtr.Zero; } } return bmp; } Any help would be appreciated?

    Read the article

  • how to implement bitmap to byte array in android

    - by satyamurthy
    hi sir i am implementing image upload in sdcard image converting bitmap in bitmap convert in bytearray i am implementing this code import java.io.ByteArrayOutputStream; import java.io.DataInputStream; import java.io.EOFException; import java.io.File; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import android.R.array; import android.app.Activity; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; import android.util.Log; import android.widget.ImageView; public class Photo extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); File f = new File("/sdcard/DCIM/1.jpg"); FileInputStream is = null; try { is = new FileInputStream(f); Bitmap bm; bm = BitmapFactory.decodeStream(is,null,null); ByteArrayOutputStream baos = new ByteArrayOutputStream(1000); bm.compress(Bitmap.CompressFormat.JPEG,75, baos); System.out.println("3........................"+bm); ImageView pic=(ImageView)this.findViewById(R.id.picview); pic.setImageBitmap(bm); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } } }this code is i am implementing how can convert bitmap in byte array INFO/System.out(12658): 3........................android.graphics.Bitmap@4358e3d0 in debug this will be displayed how can retrieve bitmap to byte array

    Read the article

  • How do i write this jpql query?

    - by Nitesh Panchal
    Hello, Say i have 5 tables, tblBlogs tblBlogPosts tblBlogPostComment tblUser tblBlogMember BlogId BlogPostsId BlogPostCommentId UserId BlogMemberId BlogTitle BlogId CommentText FirstName UserId PostTitle BlogPostsId BlogId BlogMemberId Now i want to retrieve only those blogs and posts for which blogMember has actually commented. So in short, how do i write this plain old sql :- Select b.BlogTitle, bp.PostTitle, bpc.CommentText from tblBlogs b Inner join tblBlogPosts bp on b.BlogId = bp.BlogId Inner Join tblBlogPostComment bpc on bp.BlogPostsId = bpc.BlogPostsId Inner Join tblBlogMember bm On bpc.BlogMemberId = bm.BlogMemberId Where bm.UserId = 1; As you can see, everything is Inner join, so only that row will be retrieved for which the user has commented on some post of some blog. So, suppose he has joined 3 blogs whose ids are 1,2,3 (The blogs which user has joined are in tblBlogMembers) but the user has only commented in blog 2 (of say BlogPostId = 1). So that row will be retrieved and 1,3 won't as it is Inner Join. How do i write this kind of query in jpql? In jpql, we can only write simple queries like say :- Select bm.blogId from tblBlogMember Where bm.UserId = objUser; Where objUser is supplied using :- em.find(User.class,1); Thus once we get all blogs(Here blogId represents a blog object) which user has joined, we can loop through and do all fancy things. But i don't want to fall in this looping business and write all this things in my java code. Instead, i want to leave that for database engine to do. So, how do i write the above plain sql into jpql? and what type of object the jpql query will return? because i am only selecting few fields from all table. In which class should i typecast the result to? I think i posted my requirement correctly, if i am not clear please let me know. Thanks in advance :).

    Read the article

  • How to smooth an image loaded with FileReference?

    - by Lost_in_code
    Been trying to smooth images loaded with FileReferece with no luck. Below is the code I'm using: fileRef = new FileReference(); fileRef.addEventListener(Event.COMPLETE, fileLoaded); private function fileLoaded(e:Event):void{ var ldr:Loader = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e:Event):void{ var bm:Bitmap = Bitmap(e.target.content as Bitmap); bm.smoothing = true; img.load(bm) }); ldr.loadBytes(fileRef.data); } <custom:SWFLoaderAdvanced id="img"/> bm.smoothing should've smoothened the loaded image, but for some reason it doesn't. Am I missing something here? Note: SWFLoaderAdvanced automatically smoothens any image that's loaded inside it. It works perfectly with loaded images other than the ones loaded with FileReference.

    Read the article

  • C# graphics flickering

    - by David
    Hello, I am working on kind of drawing program but I have a problem with flickering while moving a mouse cursor while drawing a rubberband line. I hope you can help me to remove that flickering of line, here is the code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace GraphicsTest { public partial class Form1 : Form { int xFirst, yFirst; Bitmap bm = new Bitmap(1000, 1000); Graphics bmG; Graphics xG; Pen pen = new Pen(Color.Black, 1); bool draw = false; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { bmG = Graphics.FromImage(bm); xG = this.CreateGraphics(); bmG.Clear(Color.White); } private void Form1_MouseDown(object sender, MouseEventArgs e) { xFirst = e.X; yFirst = e.Y; draw = true; } private void Form1_MouseUp(object sender, MouseEventArgs e) { bmG.DrawLine(pen, xFirst, yFirst, e.X, e.Y); draw = false; xG.DrawImage(bm, 0, 0); } private void Form1_MouseMove(object sender, MouseEventArgs e) { if (draw) { xG.DrawImage(bm, 0, 0); xG.DrawLine(pen, xFirst, yFirst, e.X, e.Y); } } private void Form1_Paint(object sender, PaintEventArgs e) { xG.DrawImage(bm, 0, 0); } } }

    Read the article

  • How do i write this jpql query? java

    - by Nitesh Panchal
    Hello, Say i have 5 tables, tblBlogs tblBlogPosts tblBlogPostComment tblUser tblBlogMember BlogId BlogPostsId BlogPostCommentId UserId BlogMemberId BlogTitle BlogId CommentText FirstName UserId PostTitle BlogPostsId BlogId BlogMemberId Now i want to retrieve only those blogs and posts for which blogMember has actually commented. So in short, how do i write this plain old sql :- Select b.BlogTitle, bp.PostTitle, bpc.CommentText from tblBlogs b Inner join tblBlogPosts bp on b.BlogId = bp.BlogId Inner Join tblBlogPostComment bpc on bp.BlogPostsId = bpc.BlogPostsId Inner Join tblBlogMember bm On bpc.BlogMemberId = bm.BlogMemberId Where bm.UserId = 1; As you can see, everything is Inner join, so only that row will be retrieved for which the user has commented on some post of some blog. So, suppose he has joined 3 blogs whose ids are 1,2,3 (The blogs which user has joined are in tblBlogMembers) but the user has only commented in blog 2 (of say BlogPostId = 1). So that row will be retrieved and 1,3 won't as it is Inner Join. How do i write this kind of query in jpql? In jpql, we can only write simple queries like say :- Select bm.blogId from tblBlogMember Where bm.UserId = objUser; Where objUser is supplied using :- em.find(User.class,1); Thus once we get all blogs(Here blogId represents a blog object) which user has joined, we can loop through and do all fancy things. But i don't want to fall in this looping business and write all this things in my java code. Instead, i want to leave that for database engine to do. So, how do i write the above plain sql into jpql? and what type of object the jpql query will return? because i am only selecting few fields from all table. In which class should i typecast the result to? I think i posted my requirement correctly, if i am not clear please let me know. Thanks in advance :).

    Read the article

  • Is there any other efficient way to use table variable instead of using temporary table

    - by varta shrimali
    we are writing script to display banners on a web page where we are using temporary table in mysql procedure. Is there any other efficient way to use table variable instead of using temporary table we are using following code: -- banner location CURSOR -- DECLARE banner_location_cursor CURSOR FOR select bm.id as masterId, bm.section as masterName, bs.id as locationId, bs.sectionName as locationName from banner_master as bm inner join banner_section as bs on bm.id=bs.masterId where bm.section=sCode ; -- DECLARE banner CURSORS DECLARE banner_cursor CURSOR FOR SELECT bd.id as bannerId, bd.sectionId, bd.bannerName, bd.websiteURL, bd.paymentType, bd.status, bd.startDate, bd.endDate, bd.bannerDisplayed, bs.id, bs.sectionName from banner_detail as bd inner join banner_section as bs on bs.id=bd.sectionId where bs.id= location_id and bd.status='A' and (dates between cast(bd.startDate as DATE) and cast(bd.endDate as DATE)) order by rand(), bd.bannerDisplayed asc limit 1 ; DECLARE CONTINUE HANDLER FOR NOT FOUND SET no_more_rows = 1; SET dates = (select curdate()); -- RESULTS TABLE WHICH WILL BE RETURNED -- CREATE temporary TABLE test ( b_id INT, s_id INT, b_name varchar(128), w_url varchar(128), p_type varchar(128), st char(1), s_date datetime, e_date datetime, b_display int, sec_id int, s_name varchar(128) ); -- OPEN banner location CURSOR OPEN banner_location_cursor; the_loop: LOOP FETCH banner_location_cursor INTO master_id, master_name, location_id, location_name; IF no_more_rows THEN CLOSE banner_location_cursor; leave the_loop; END IF; OPEN banner_cursor; -- select FOUND_ROWS(); the_loop2: LOOP FETCH banner_cursor INTO banner_id, section_id, banner_name, website_url, payment, status, start_date, end_date, banner_displayed, sec_id, section_name; IF no_more_rows THEN set no_more_rows = 0; CLOSE banner_cursor; leave the_loop2; END IF; INSERT INTO test ( b_id, s_id, b_name , w_url, p_type, st, s_date, e_date, b_display, sec_id, s_name ) VALUES ( banner_id, section_id, banner_name, website_url, payment, status, start_date, end_date, banner_displayed, sec_id, section_name ); UPDATE banner_detail set bannerDisplayed = (banner_displayed+1) where id = banner_id; END LOOP the_loop2; END LOOP the_loop; -- RETURN result SELECT * FROM test; -- DROP RESULTS TABLE DROP TABLE test; END

    Read the article

  • Bitmap issue in Samsung Galaxy S3

    - by user1531240
    I wrote a method to change Bitmap from camera shot : public Bitmap bitmapChange(Bitmap bm) { /* get original image size */ int w = bm.getWidth(); int h = bm.getHeight(); /* check the image's orientation */ float scale = w / h; if(scale < 1) { /* if the orientation is portrait then scaled and show on the screen*/ float scaleWidth = (float) 90 / (float) w; float scaleHeight = (float) 130 / (float) h; Matrix mtx = new Matrix(); mtx.postScale(scaleWidth, scaleHeight); Bitmap rotatedBMP = Bitmap.createBitmap(bm, 0, 0, w, h, mtx, true); return rotatedBMP; } else { /* if the orientation is landscape then rotate 90 */ float scaleWidth = (float) 130 / (float) w; float scaleHeight = (float) 90 / (float) h; Matrix mtx = new Matrix(); mtx.postScale(scaleWidth, scaleHeight); mtx.postRotate(90); Bitmap rotatedBMP = Bitmap.createBitmap(bm, 0, 0, w, h, mtx, true); return rotatedBMP; } } It works fine in another Android device, even Galaxy Nexus but in Samsung Galaxy S3, the scaled image doesn't show on screen. I tried to mark the bitmapChange method , let it show the original size Bitmap on screen but S3 also show nothing on screen. The information of variables in eclipse is here. The information of sony xperia is here. xperia and other device is working fine.

    Read the article

  • java.lang.OutOfMemoryError: bitmap size exceeds VM budget ?

    - by UMMA
    friends, i am using following code to display bitmap on screen and having next and previous buttons to change images. and getting out of memory error New Code HttpGet httpRequest = null; try { httpRequest = new HttpGet(mImage_URL[val]); } catch (Exception e) { return 0; } HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = (HttpResponse) httpclient.execute(httpRequest); Bitmap bm; HttpEntity entity = response.getEntity(); BufferedHttpEntity bufHttpEntity = new BufferedHttpEntity(entity); InputStream is = bufHttpEntity.getContent(); try { bm = BitmapFactory.decodeStream(is); }catch(Exception ex) { } is.close(); Old Code URL aURL = new URL(mImage_URL[val]); URLConnection conn = aURL.openConnection(); conn.connect(); InputStream is = null; try { is= conn.getInputStream(); }catch(IOException e) { } BufferedInputStream bis = new BufferedInputStream(is); bm = BitmapFactory.decodeStream(bis); bis.close(); is.close(); img.setImageBitmap(bm); and it was giving me error decoder-decode return false. on images of size bigger than 400kb. so after googling i got new code as answer the old code was not giving me out of memory error on those images but decoder-decode return false, so i choosed new code. any one guide me what is the solution and which is the best approach to display live images?

    Read the article

  • Add new row in a databound form with a Oracle Sequence as the primary key

    - by Ranhiru
    I am connecting C# with Oracle 11g. I have a DataTable which i fill using an Oracle Data Adapter. OracleDataAdapter da; DataTable dt = new DataTable(); da = new OracleDataAdapter("SELECT * FROM Author", con); da.Fill(dt); I have few text boxes that I have databound to various rows in the data table. txtAuthorID.DataBindings.Add("Text", dt, "AUTHORID"); txtFirstName.DataBindings.Add("Text", dt, "FIRSTNAME"); txtLastName.DataBindings.Add("Text", dt, "LASTNAME"); txtAddress.DataBindings.Add("Text", dt, "ADDRESS"); txtTelephone.DataBindings.Add("Text", dt, "TELEPHONE"); txtEmailAddress.DataBindings.Add("Text", dt, "EMAIL"); I also have a DataGridView below the Text Boxes, showing the contents of the DataTable. dgvAuthor.DataSource = dt; Now when I want to add a new row, i do bm.AddNew(); where bm is defined in Form_Load as BindingManagerBase bm; bm = this.BindingContext[dt]; And when the save button is clicked after all the information is entered and validated, i do this.BindingContext[dt].EndCurrentEdit(); try { da.Update(dt); } catch (Exception ex) { MessageBox.Show(ex.Message); } However the problem comes where when I usually enter a row to the database (using SQL Plus) , I use a my_pk_sequence.nextval for the primary key. But how do i specify that when i add a new row in this method? I catch this exception ORA-01400: cannot insert NULL into ("SYSMAN".AUTHOR.AUTHORID") which is obvious because nothing was specified for the primary key. How do get around this? Thanx a lot in advance :)

    Read the article

  • Inverted colours in tiff to PDF conversion

    - by spiderdijon
    I'm sure I'm making some kind of silly mistake here, but when converting a tiff file to PDF, the colours become reversed. I can't figure out why. Here's my code: PdfWriter writer = PdfWriter.GetInstance(document, new FileStream("Image.pdf", FileMode.Create)); System.Drawing.Bitmap bm = new System.Drawing.Bitmap(@"C:\Temp\338814-00.tif"); int total = bm.GetFrameCount(FrameDimension.Page); document.Open(); PdfContentByte cb = writer.DirectContent; for (int k = 0; k < total; ++k) { bm.SelectActiveFrame(FrameDimension.Page, k); MemoryStream ms = new MemoryStream(); bm.Save(ms, ImageFormat.Tiff); Image img = Image.GetInstance(ms.ToArray()); img.ScalePercent(72f / (float)img.DpiX * 100); img.SetAbsolutePosition(0, 0); cb.AddImage(img); document.NewPage(); } document.Close(); Thanks.

    Read the article

  • Sendmail is not ignoring MX lookups

    - by daniel
    Hello, I recently learned of the joys of square brackets with SMART_HOST to have sendmail ignore MX lookups. I need this functionality, however, I can't seem to make it persistant. Sending mail with -Am works, however, -bm does not. In the -Am case, the correct mail server is used. In the -bm case, an MX lookup is still being performed. Is there a way to disable MX lookups (or some working alternative)? Thanks

    Read the article

  • Is it possible to create a CImageList with alpha blending transparency?

    - by Sorin Sbarnea
    I would like to knwo if it is possible to create a CImageList with alpha blending transparency. Sample code that creates a CImageList with ugly transparency (no alpha blending) CGdiPlusBitmapResource m_pBitmap; m_pBitmap.Load(IDB_RIBBON_FILESMALL,_T("PNG"),AfxGetResourceHandle()); HBITMAP hBitmap; m_pBitmap.m_pBitmap->GetHBITMAP(RGB(0,0,0),&hBitmap ); CImageList *pList=new CImageList; CBitmap bm; bm.Attach(hBitmap); pList->Create(16, 16, ILC_COLOR32 | ILC_MASK, 0, 4); pList->Add(&bm, RGB(255,0,255));

    Read the article

1 2 3 4  | Next Page >