Search Results

Search found 17342 results on 694 pages for 'custom draw'.

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

  • Is there a jQuery Equivalent of YUI 2 Custom Event Publish/Subscribe Event Model?

    - by Abe
    Hello! I learned how to develop in Javascript using the YUI 2 library and was wondering if there is a jQuery equivalent of Custom Events (http://developer.yahoo.com/yui/event/#customevent) Specifically, I want to be able to define custom events without having to attach the listeners initially. In YUI, I would create a page class and declare different custom events that can be subscribed to. Below is some example code to demonstrate what I want to do, but with jQuery function ListPage() { var me = this; this.initEvent = new YAHOO.util.CustomEvent("initEvent"); this.init = function() { // initialize events, DOM, etc this.initEvent.fire(me); } } In application Javascript, I would then like to subscribe to the initEvent. var page = new ListPage(); page.initEvent.subscribe( function (type, args) { // do stuff here } ); page.init(); Are there any tutorials/examples of something this in jQuery? I understand I can do something similar using bind() and trigger(), but the impression I get is I have to pass in the event handler when I call bind(). Is it possible in jQuery to create the custom event, but pass in the event handler later? I hope my question makes sense. thanks!

    Read the article

  • Chrome does not re-draw properly on Windows 8

    - by Akshat Mittal
    There are a lot of problems with Chrome (24.0.1312.14 beta || But all this happened before update also) on Windows 8. Problems and explanations are listed below: Google Chrome re-draw time: When I switch tabs, the window retains the content of the previous tab and displays that even if I move my mouse, if only refreshes (re-draws) when there is a change on the webpage (like on hover) or I do a select all (or scroll). One thing to note is that the hover and select happens on the real page and not the retained image-like thing of the older webpage. Chrome is slow and laggy: Websites such as Facebook and Twitter (and more) have gone extremely laggy on Chrome (Win 8). When I was using Windows 7, I never experienced a lag or something. Also when using HTML-5 Websites, the transition (the -webkit-transition in CSS) goes extremely slow at times. Plugins Crash: Plugins like Flash Player, Shockwave Player, and more that are in-built into Chrome Crashes a lot, even when doing simple tasks like playing YouTube Videos, displaying ads or something. Chrome Crashes: Chrome has crashed over 100 times in the past month. Google Chrome just crashes randomly or I don't know the reason. Random Page crashes: Chrome results chrome://crash/(Copy-Paste this in address bar) on random pages even when the page is just loaded, I understand that this can happen on heavy HTML5 or JS websites but what about HTML only websites? Computer Freeze: Chrome sometimes, randomly, freezes my computer. Freeze in the sense, none of the other apps are also working. It's like the whole system freezes, I can not even switch to other apps. I am sure that this is because of Chrome since this happens only when Chrome is active. Most of the things above happens on Super User also, Super User never had any problem when using Chrome on Windows 7. UPDATE 1: @magicandre1981 Commented for trying to disable Hardware Acceleration. I tried it, it somewhat solved the problem but din't fix it. I am still experiencing all the above issues but less frequently (maybe because Chrome Restarted Completely) UPDATE 2: @avirk asked me to try a Stable Version of Chrome and Firefox, I din't experience any lag in Firefox, a little (negligible) lag in Chrome 22 (Maybe because its a new copy of Chrome, I haven't used it much). UPDATE 3: @NothingsImpossible said that He is also experiencing the same problem on Windows Server 2008! This seams to be a major issue now. He also said that GPU load is also high at the same time! Even I saw the same thing. UPDATE 4: Recently, Chrome updated to v24 Stable (I am using stable from a long time now). I was experiencing this problem a lot less in Chrome 23, but this is back in Chrome 24. Seams like Chrome 24 is the most affected from this bug, as this same problem was high in Chrome 24 beta also. UPDATE 5: Chrome was updated to v25 Stable. This problem is 99% Gone, it is still there in 1% of the cases. One such example is when I leave chrome inactive for a while with a few tabs open, the tabs go black and no activity can get them back to active state. If I open a new tab, the new tab is OK but the others are still black, I need to close all those tabs. UPDATE 6: Chrome updated to v27 Stable channel, this problem is nearly gone. This does happen occasionally, but not as frequent as in earlier versions of Chrome. UPDATE 7: I am on Chrome v35.0.1916.114 Stable, Windows 8.1 Pro Update 1. Some of the other problems appears to be back. Chrome is slow and laggy again. Re-draw time is getting worse. Is anybody else experiencing such issues? Does anybody have a solution to any of these?

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part2

    - by ybbest
    In the first part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript. In this one, I’d like to show you how to display some information after the Modal dialog is closed.You can download the source code here. 1. Firstly, modify the element file as follow <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function emitStatus(messageToDisplay) { statusId = SP.UI.Status.addStatus(messageToDisplay.message + ' ' +messageToDisplay.location ); SP.UI.Status.setStatusPriColor(statusId, 'Green'); } function portalModalDialogClosedCallback(result, value) { if (value !== null) { emitStatus(value); } } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: portalModalDialogClosedCallback }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. protected static string GetCloseDialogScript(string message) { var scriptBuilder = new StringBuilder(); scriptBuilder.Append("<script type='text/javascript'>" + "SP.UI.ModalDialog.commonModalDialogClose(1,").Append(message).Append("); </script>"); return scriptBuilder.ToString(); }

    Read the article

  • How to use SharePoint modal dialog box to display Custom Page Part2

    - by ybbest
    In the first part of the series, I showed you how to display and close a custom page in a SharePoint modal dialog using JavaScript. In this one, I’d like to show you how to display some information after the Modal dialog is closed.You can download the source code here. 1. Firstly, modify the element file as follow <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ReportConcern" RegistrationType="ContentType" RegistrationId="0x010100866B1423D33DDA4CA1A4639B54DD4642" Location="EditControlBlock" Sequence="107" Title="Display Custom Page" Description="To Display Custom Page in a modal dialog box on this item"> <UrlAction Url="javascript: function emitStatus(messageToDisplay) { statusId = SP.UI.Status.addStatus(messageToDisplay.message + ' ' +messageToDisplay.location ); SP.UI.Status.setStatusPriColor(statusId, 'Green'); } function portalModalDialogClosedCallback(result, value) { if (value !== null) { emitStatus(value); } } var options = { url: '{SiteUrl}' + '/_layouts/YBBEST/TitleRename.aspx?List={ListId}&amp;ID={ItemId}', title: 'Rename title', allowMaximize: false, showClose: true, width: 500, height: 300, dialogReturnValueCallback: portalModalDialogClosedCallback }; SP.UI.ModalDialog.showModalDialog(options);" /> </CustomAction> </Elements> 2. In your code behind, you can implement a close dialog function as below. This will close your modal dialog box once the button is clicked and display a status bar. protected static string GetCloseDialogScript(string message) { var scriptBuilder = new StringBuilder(); scriptBuilder.Append("<script type='text/javascript'>" + "SP.UI.ModalDialog.commonModalDialogClose(1,").Append(message).Append("); </script>"); return scriptBuilder.ToString(); }

    Read the article

  • Representing and executing simple rules - framework or custom?

    - by qtips
    I am creating a system where users will be able to subscribe to events, and get notified when the event has occured. Example of events can be phone call durations and costs, phone data traffic notations, and even stock rate changes. Example of events: customer 13532 completed a call with duration 11:45 min and cost $0.4 stock rate for Google decreased with 0.01% Customers can subscribe to events using some simple rules e.g. When stock rate of Google decreases more than 0.5% When the cost of a call of my subscription is over $1 Now, as the set of different rules is currently predefined, I can easily create a custom implemention that applies rules to an event. But if the set of rules could be much larger, and if we also allow for custom rules (e.g. when stock rate of Google decreses more than 0.5% AND stock rate of Apple increases with 0.5%), the system should be able to adapt. I am therefore thinking of a system that can interpret rules using a simple grammer and then apply them. After som research I found that there exists rule-based engines that can be used, but I am unsure as they seem too complicated and may be a little overkill for my situation. Is there a Java framework suited for this area? Should we use framework, a rule engine, or should we create something custom? What are the pros and cons?

    Read the article

  • Custom Session Management using HashTable

    - by kaleidoscope
    ASP.NET session state lets you associate a server-side string or object dictionary containing state data with a particular HTTP client session. A session is defined as a series of requests issued by the same client within a certain period of time, and is managed by associating a session ID with each unique client. The ID is supplied by the client on each request, either in a cookie or as a special fragment of the request URL. The session data is stored on the server side in one of the supported session state stores, which include in-process memory, SQL Server™ database, and the ASP.NET State Server service. The latter two modes enable session state to be shared among multiple Web servers on a Web farm and do not require server affinity. Implement Custom session Handler you need to follow following process : 1. Create class library which will inherit from  SessionStateStoreProviderBase abstract Class. 2. Implement all abstract Method in your base class. 3.Change Mode of session to “Custom” in web.config file and provide Provider as your Namespace with classname. <sessionState mode=”Custom” customProvider=”Namespace.classname”> <Providers> <add name=”Name” type=”Namespace.classname”> </sessionstate> For more Details Please refer following links :   http://msdn.microsoft.com/en-us/magazine/cc163730.aspx http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionstatestoreproviderbase.aspx - Chandraprakash, S Technorati Tags: Chandraprakash,Session state Managment

    Read the article

  • Custom LightDM sessions to launch an application

    - by zachtib
    I'm trying to set up Ubuntu to act as a kiosk running a custom application, and am trying to get a LightDM session built to automatically start it. Ideally, I'd like to have two sessions available from LightDM. The default would start my application fullscreened, and the other would open a minimal desktop in case any configuration (mostly connecting to a wireless network) needed to be done. I've done a lot of research over the last week on custom LightDM & Gnome sessions. I've got a custom greeter written for LightDM that can start either session, but I can't figure out how to add a specific application to the Gnome session that is ultimately started without just putting a launcher in the global startup directory, and I don't want to do that since I don't want the application starting when they open "configuration mode". Another problem I've run into on my current workaround is that the application doesn't fullscreen properly, which makes me think I'm not starting enough of a gnome session (currently it's just metacity, no panel or anything else). Edit: I found a solution. See http://www.webupd8.org/2011/11/make-applications-autostart-only-in.html

    Read the article

  • Ubiquitous Language and Custom types

    - by EdvRusj
    Note that my question is referring to those attributes that even on their own already represent a concept ( ie on their own provide a cohesive meaning ). Thus such attribute needs no additional functional support and as such is self-contained. I'm also well-aware that even with self-contained attributes the custom types may prove beneficial ( for example, they give the ability to add new behavior later, when business requirements change ). Thus, my question focuses only on whether custom types for self-contained attributes really enrich Ubiquitous Language UL a) I've read that in most cases, even simple, self-contained attributes should have custom, more descriptive types rather than basic value types ( double, string ... ), because among other things, descriptive types add to the UL, while the use of basic types instead weakens the language. I understand the importance of UL, but how does having a basic type for a self-contained attribute weaken the language, since with self-contained attributes the name of the attribute already adequately describes the concept and thus contributes to the UL vocabulary? For example, the term person_age already adequately explains the concept of quantifying the number of years a person has: class Person { string person_age; } so what could we possibly gain by also introducing the term ThingAge to the UL: class person { ThingAge person_age; } thanks

    Read the article

  • NSIS: Access values of combo box of custom page?

    - by Xinus
    I have added custom page to NSIS installer using ini files, here is a code . . . ; Welcome page !insertmacro MUI_PAGE_WELCOME Page custom customPage "" ": custom page" . . . Function customPage GetTempFileName $R0 File /oname=$R0 customPage.ini InstallOptions::dialog $R0 Pop $R1 StrCmp $R1 "cancel" done StrCmp $R1 "back" done StrCmp $R1 "success" done error: MessageBox MB_OK|MB_ICONSTOP "InstallOptions error:$\r$\n$R1" done: FunctionEnd . . . Here is a customPage.ini file ; Ini file generated by the HM NIS Edit IO designer. [Settings] NumFields=2 [Field 1] Type=Label Text=Select Version: Left=4 Right=53 Top=16 Bottom=26 [Field 2] Type=Combobox Text=Combobox ListItems= Left=53 Right=138 Top=14 Bottom=107 I want to set values of combobox dynamically using NSIS script, how can I access combobox in nsis?

    Read the article

  • XNA Level Select Menu

    - by user29901
    I'll try to explain this the best I can. I'm trying to create a level select menu for a game I'm making. The menu is basically a group of blocks numbered 1-16, similar to something like the Angry Birds menu. What I've done is created a cursor, basically just an outline to surround a block, that the user can move to select what level they want to play. What I want it do is move from block to block instead of simply moving around on the X and Y axes as it does now. So my question is, how can I get the cursor (highLight in the below code) to move from block to block(destinationRectangle1 etc. in the code)? /// Field for the "cursor" Vector2 highLightPos = new Vector2(400, 200); ///This is the Update code KeyboardState keyBoardState = Keyboard.GetState(); if (keyBoardState.IsKeyDown(Keys.Up)) highLightPos.Y--; if (keyBoardState.IsKeyDown(Keys.Down)) highLightPos.Y++; if (keyBoardState.IsKeyDown(Keys.Right)) highLightPos.X++; if (keyBoardState.IsKeyDown(Keys.Left)) highLightPos.X--; /// This is the draw code SpriteBatch spriteBatch = ScreenManager.SpriteBatch; Rectangle screenRectangle = new Rectangle(0, 0, 1280, 720); Rectangle destinationRectangle1 = new Rectangle(400, 200, 64, 64); Rectangle frameRectangle1 = new Rectangle(0, 0, 64, 64); Rectangle destinationRectangle2 = new Rectangle(500, 200, 64, 64); Rectangle frameRectangle2 = new Rectangle(64, 0, 64, 64); Rectangle destinationRectangle3 = new Rectangle(600, 200, 64, 64); Rectangle frameRectangle3 = new Rectangle(128, 0, 64, 64); Rectangle destinationRectangle4 = new Rectangle(700, 200, 64, 64); Rectangle frameRectangle4 = new Rectangle(192, 0, 64, 64); Rectangle destinationRectangle5 = new Rectangle(800, 200, 64, 64); Rectangle frameRectangle5 = new Rectangle(256, 0, 64, 64); Rectangle destinationRectangle6 = new Rectangle(400, 300, 64, 64); Rectangle frameRectangle6 = new Rectangle(320, 0, 64, 64); Rectangle destinationRectangle7 = new Rectangle(500, 300, 64, 64); Rectangle frameRectangle7 = new Rectangle(384, 0, 64, 64); Rectangle destinationRectangle8 = new Rectangle(600, 300, 64, 64); Rectangle frameRectangle8 = new Rectangle(448, 0, 64, 64); Rectangle destinationRectangle9 = new Rectangle(700, 300, 64, 64); Rectangle frameRectangle9 = new Rectangle(0, 64, 64, 64); Rectangle destinationRectangle10 = new Rectangle(800, 300, 64, 64); Rectangle frameRectangle10 = new Rectangle(64, 64, 64, 64); Rectangle destinationRectangle11 = new Rectangle(400, 400, 64, 64); Rectangle frameRectangle11 = new Rectangle(128, 64, 64, 64); Rectangle destinationRectangle12 = new Rectangle(500, 400, 64, 64); Rectangle frameRectangle12 = new Rectangle(192, 64, 64, 64); Rectangle destinationRectangle13 = new Rectangle(600, 400, 64, 64); Rectangle frameRectangle13 = new Rectangle(256, 64, 64, 64); Rectangle destinationRectangle14 = new Rectangle(700, 400, 64, 64); Rectangle frameRectangle14 = new Rectangle(320, 64, 64, 64); Rectangle destinationRectangle15 = new Rectangle(800, 400, 64, 64); Rectangle frameRectangle15 = new Rectangle(384, 64, 64, 64); Rectangle destinationRectangle16 = new Rectangle(600, 500, 64, 64); Rectangle frameRectangle16 = new Rectangle(448, 64, 64, 64); spriteBatch.Begin(); spriteBatch.Draw(forestBG, screenRectangle, Color.White); spriteBatch.Draw(highLight, highLightPos, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle1, frameRectangle1, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle2, frameRectangle2, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle3, frameRectangle3, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle4, frameRectangle4, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle5, frameRectangle5, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle6, frameRectangle6, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle7, frameRectangle7, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle8, frameRectangle8, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle9, frameRectangle9, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle10, frameRectangle10, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle11, frameRectangle11, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle12, frameRectangle12, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle13, frameRectangle13, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle14, frameRectangle14, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle15, frameRectangle15, Color.White); spriteBatch.Draw(levelSelectTiles, destinationRectangle16, frameRectangle16, Color.White); spriteBatch.End(); PS, I'm aware that this code is probably inefficient, cumbersome or that there's a better way to draw parts of a tile sheet. Any suggestions would be appreciated.

    Read the article

  • Alpha blend 3D png texture in XNA

    - by ProgrammerAtWork
    I'm trying to draw a partly transparent texture a plane, but the problem is that it's incorrectly displaying what is behind that texture. Pseudo code: vertices1 basiceffect1 // The vertices of vertices1 are located BEHIND vertices2 vertices2 basiceffect2 // The vertices of vertices2 are located IN FRONT vertices1 GraphicsDevice.Clear(Blue); PrimitiveBatch.Begin(); //if I draw like this: PrimitiveBatch.Draw(vertices1, trianglestrip, basiceffect1) PrimitiveBatch.Draw(vertices2, trianglestrip, basiceffect2) //Everything gets draw correctly, I can see the texture of vertices2 trough //the transparent parts of vertices1 //but if I draw like this: PrimitiveBatch.Draw(vertices2, trianglestrip, basiceffect2) PrimitiveBatch.Draw(vertices1, trianglestrip, basiceffect1) //I cannot see the texture of vertices1 in behind the texture of vertices2 //Instead, the texture vertices2 gets drawn, and the transparent parts are blue //The clear color PrimitiveBatch.Draw(vertice PrimitiveBatch.End(); My question is, Why does the order in which I call draw matter?

    Read the article

  • How can I use Databound variables in conditional statements within Custom Databound controls?

    - by William Calleja
    I'm developing my custom DataBound Controls that make use of an '<ItemTemplate>' tag and '<%# %>' server tags to generate some data however I need to make a conditional statement within one of my Databound controls as shown below. <custom:DataboundControl runat="server"> <ItemTemplate> <% if(((Dictionary<string, string>)Container.DataItem)["MyVariable"]=="" { %> <!-- Conditional Code Happens Here --> <% } %> </ItemTemplate> </custom:DataboundControl> Right now my code isn't working because the compiler cannot recognize my Container.DataItem variable within a <% %> tag and a <%# %> tag doesn't support conditional statements. What can I use?

    Read the article

  • gtk draw "expose-event" and redraw

    - by warem
    I want to use expose-event to draw something then update or redraw. That's to say, there are a drawing area and a button in window. When clicking button, the drawing area will be redrawn accordingly. My problems are Following code worked but it only had a drawing area no button. If I add the button(cancel the comment for button), nothing is drawn. What's the reason? In the following code, if I changed gtk_container_add (GTK_CONTAINER (box), canvas); to gtk_box_pack_start(GTK_BOX(box), canvas, FALSE, FALSE, 0);, nothing is drawn. Usually we use gtk_box_pack_start to add something into box. Why doesn't it work this time? The function build_ACC_axis refreshed drawing area and prepared for new draw. I google it but I didn't know if it worked. Could you please comment on it? If the source file is test.c, then compilation is gcc -o test test.c `pkg-config --cflags --libs gtk+-2.0` The code is below: #include <gtk/gtk.h> #include <glib.h> static void draw (GdkDrawable *d, GdkGC *gc) { /* Draw with GDK */ gdk_draw_line (d, gc, 0, 0, 50, 50); gdk_draw_line (d, gc, 50, 50, 50, 150); gdk_draw_line (d, gc, 50, 150, 0, 200); gdk_draw_line (d, gc, 200, 0, 150, 50); gdk_draw_line (d, gc, 150, 50, 150, 150); gdk_draw_line (d, gc, 150, 150, 200, 200); gdk_draw_line (d, gc, 50, 50, 150, 50); gdk_draw_line (d, gc, 50, 150, 150, 150); } static gboolean expose_cb (GtkWidget *canvas, GdkEventExpose *event, gpointer user_data) { GdkGC *gc; gc = gdk_gc_new (canvas->window); draw (canvas->window, gc); g_object_unref (gc); return FALSE; } void build_ACC_axis (GtkWidget *button, GtkWidget *widget) { GdkRegion *region; GtkWidget *canvas = g_object_get_data(G_OBJECT(widget), "plat_GA_canvas"); region = gdk_drawable_get_visible_region(canvas->window); gdk_window_invalidate_region(canvas->window, region, TRUE); gtk_widget_queue_draw(canvas); /* gdk_window_process_updates(canvas->window, TRUE); */ gdk_region_destroy (region); } int main (int argc, char **argv) { GtkWidget *window; GtkWidget *canvas, *box, *button; gtk_init (&argc, &argv); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK (gtk_main_quit), NULL); box = gtk_vbox_new(FALSE, 0); gtk_container_add (GTK_CONTAINER (window), box); canvas = gtk_drawing_area_new (); g_object_set_data(G_OBJECT(window), "plat_GA_canvas", canvas); /* gtk_box_pack_start(GTK_BOX(box), canvas, FALSE, FALSE, 0); */ gtk_container_add (GTK_CONTAINER (box), canvas); g_signal_connect (G_OBJECT (canvas), "expose-event", G_CALLBACK (expose_cb), NULL); /* button = gtk_button_new_with_label ("ok"); gtk_box_pack_start(GTK_BOX(box), button, FALSE, FALSE, 0); |+ gtk_container_add (GTK_CONTAINER (box), button); +| gtk_signal_connect(GTK_OBJECT(button), "clicked", GTK_SIGNAL_FUNC(build_ACC_axis), window); */ gtk_widget_show_all (window); gtk_main (); }

    Read the article

  • Created Custom Report in Google Analytics, Primary Account Doesn't See It?

    - by Anagio
    A client shared access with me to their Google Analytics account. I created a custom report which shows up under Custom Reporting for me. I assumed they would also see this report since it was in their account but they sent me a screen shot showing there's no custom report listed. I have already sent them the shortcut link to the custom report configuration. This seems to be the way to share custom reports along with dashboards in GA now. Do custom reports only appear to the accounts (email) that created them? I would think everyone who had access to the account would see the custom report.

    Read the article

  • How to get pen input to draw?

    - by Cameron J
    I just got a crappy little Hyundai pen input module To use on a normal Windows 7 HP laptop, it works quite well with the Hyundai software, but that's in Chinese, and the input only stays on the screen for a second. When I try to use it in Paint, it just draws a dot, and switches back to an unclicked state, similarly, it's impossible to move a window. Is there ant way I can keep the click held down when the pen is touching the pad in order to draw, or is there any third party software anyone knows of that can do this?

    Read the article

  • Software to draw custom street maps?

    - by jay
    I'm looking for any (Windows) software that allows me to draw custom street maps. I'm not looking for something that displays existing maps from real places, but something that allows me to define my own map. Obviously this can be achieved through any graphics program however I am wondering if there's a software which makes it almost drag-drop easy to create your own maps of visual quality to that of Open Street Maps, Google Maps, street directories etc. Preferably an offline desktop app with attention on design rather than complex geospacial specifics. Context: I want to make a detailed street map for a game I'm making.

    Read the article

  • How to draw diagrams in Open Office?

    - by Amokrane
    Hi, I would like to draw diagrams using Open Office but I didn't find any installed by default. What I am exactly looking for are diagrams that look like the ones that come with MS Office 2007/2010 (like Pyramid diagrams, Star diagrams etc.). Any idea? A plugin to install? Otherwise are there any online services that can do it? (I have tested Cacoo and gliffy but they don't really offer the diagrams that I am looking for). Thanks!

    Read the article

  • Anatomy of a .NET Assembly - Custom attribute encoding

    - by Simon Cooper
    In my previous post, I covered how field, method, and other types of signatures are encoded in a .NET assembly. Custom attribute signatures differ quite a bit from these, which consequently affects attribute specifications in C#. Custom attribute specifications In C#, you can apply a custom attribute to a type or type member, specifying a constructor as well as the values of fields or properties on the attribute type: public class ExampleAttribute : Attribute { public ExampleAttribute(int ctorArg1, string ctorArg2) { ... } public Type ExampleType { get; set; } } [Example(5, "6", ExampleType = typeof(string))] public class C { ... } How does this specification actually get encoded and stored in an assembly? Specification blob values Custom attribute specification signatures use the same building blocks as other types of signatures; the ELEMENT_TYPE structure. However, they significantly differ from other types of signatures, in that the actual parameter values need to be stored along with type information. There are two types of specification arguments in a signature blob; fixed args and named args. Fixed args are the arguments to the attribute type constructor, named arguments are specified after the constructor arguments to provide a value to a field or property on the constructed attribute type (PropertyName = propValue) Values in an attribute blob are limited to one of the basic types (one of the number types, character, or boolean), a reference to a type, an enum (which, in .NET, has to use one of the integer types as a base representation), or arrays of any of those. Enums and the basic types are easy to store in a blob - you simply store the binary representation. Strings are stored starting with a compressed integer indicating the length of the string, followed by the UTF8 characters. Array values start with an integer indicating the number of elements in the array, then the item values concatentated together. Rather than using a coded token, Type values are stored using a string representing the type name and fully qualified assembly name (for example, MyNs.MyType, MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0123456789abcdef). If the type is in the current assembly or mscorlib then just the type name can be used. This is probably done to prevent direct references between assemblies solely because of attribute specification arguments; assemblies can be loaded in the reflection-only context and attribute arguments still processed, without loading the entire assembly. Fixed and named arguments Each entry in the CustomAttribute metadata table contains a reference to the object the attribute is applied to, the attribute constructor, and the specification blob. The number and type of arguments to the constructor (the fixed args) can be worked out by the method signature referenced by the attribute constructor, and so the fixed args can simply be concatenated together in the blob without any extra type information. Named args are different. These specify the value to assign to a field or property once the attribute type has been constructed. In the CLR, fields and properties can be overloaded just on their type; different fields and properties can have the same name. Therefore, to uniquely identify a field or property you need: Whether it's a field or property (indicated using byte values 0x53 and 0x54, respectively) The field or property type The field or property name After the fixed arg values is a 2-byte number specifying the number of named args in the blob. Each named argument has the above information concatenated together, mostly using the basic ELEMENT_TYPE values, in the same way as a method or field signature. A Type argument is represented using the byte 0x50, and an enum argument is represented using the byte 0x55 followed by a string specifying the name and assembly of the enum type. The named argument property information is followed by the argument value, using the same encoding as fixed args. Boxed objects This would be all very well, were it not for object and object[]. Arguments and properties of type object allow a value of any allowed argument type to be specified. As a result, more information needs to be specified in the blob to interpret the argument bytes as the correct type. So, the argument value is simple prepended with the type of the value by specifying the ELEMENT_TYPE or name of the enum the value represents. For named arguments, a field or property of type object is represented using the byte 0x51, with the actual type specified in the argument value. Some examples... All property signatures start with the 2-byte value 0x0001. Similar to my previous post in the series, names in capitals correspond to a particular byte value in the ELEMENT_TYPE structure. For strings, I'll simply give the string value, rather than the length and UTF8 encoding in the actual blob. I'll be using the following enum and attribute types to demonstrate specification encodings: class AttrAttribute : Attribute { public AttrAttribute() {} public AttrAttribute(Type[] tArray) {} public AttrAttribute(object o) {} public AttrAttribute(MyEnum e) {} public AttrAttribute(ushort x, int y) {} public AttrAttribute(string str, Type type1, Type type2) {} public int Prop1 { get; set; } public object Prop2 { get; set; } public object[] ObjectArray; } enum MyEnum : int { Val1 = 1, Val2 = 2 } Now, some examples: Here, the the specification binds to the (ushort, int) attribute constructor, with fixed args only. The specification blob starts off with a prolog, followed by the two constructor arguments, then the number of named arguments (zero): [Attr(42, 84)] 0x0001 0x002a 0x00000054 0x0000 An example of string and type encoding: [Attr("MyString", typeof(Array), typeof(System.Windows.Forms.Form))] 0x0001 "MyString" "System.Array" "System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" 0x0000 As you can see, the full assembly specification of a type is only needed if the type isn't in the current assembly or mscorlib. Note, however, that the C# compiler currently chooses to fully-qualify mscorlib types anyway. An object argument (this binds to the object attribute constructor), and two named arguments (a null string is represented by 0xff and the empty string by 0x00) [Attr((ushort)40, Prop1 = 12, Prop2 = "")] 0x0001 U2 0x0028 0x0002 0x54 I4 "Prop1" 0x0000000c 0x54 0x51 "Prop2" STRING 0x00 Right, more complicated now. A type array as a fixed argument: [Attr(new[] { typeof(string), typeof(object) })] 0x0001 0x00000002 // the number of elements "System.String" "System.Object" 0x0000 An enum value, which is simply represented using the underlying value. The CLR works out that it's an enum using information in the attribute constructor signature: [Attr(MyEnum.Val1)] 0x0001 0x00000001 0x0000 And finally, a null array, and an object array as a named argument: [Attr((Type[])null, ObjectArray = new object[] { (byte)2, typeof(decimal), null, MyEnum.Val2 })] 0x0001 0xffffffff 0x0001 0x53 SZARRAY 0x51 "ObjectArray" 0x00000004 U1 0x02 0x50 "System.Decimal" STRING 0xff 0x55 "MyEnum" 0x00000002 As you'll notice, a null object is encoded as a null string value, and a null array is represented using a length of -1 (0xffffffff). How does this affect C#? So, we can now explain why the limits on attribute arguments are so strict in C#. Attribute specification blobs are limited to basic numbers, enums, types, and arrays. As you can see, this is because the raw CLR encoding can only accommodate those types. Special byte patterns have to be used to indicate object, string, Type, or enum values in named arguments; you can't specify an arbitary object type, as there isn't a generalised way of encoding the resulting value in the specification blob. In particular, decimal values can't be encoded, as it isn't a 'built-in' CLR type that has a native representation (you'll notice that decimal constants in C# programs are compiled as several integer arguments to DecimalConstantAttribute). Jagged arrays also aren't natively supported, although you can get around it by using an array as a value to an object argument: [Attr(new object[] { new object[] { new Type[] { typeof(string) } }, 42 })] Finally... Phew! That was a bit longer than I thought it would be. Custom attribute encodings are complicated! Hopefully this series has been an informative look at what exactly goes on inside a .NET assembly. In the next blog posts, I'll be carrying on with the 'Inside Red Gate' series.

    Read the article

  • Python - wxPython custom button -> unbound method __init__()? what?

    - by Wallter
    After looking at questions like this it doesn't make sense that my __init__(self, parrent, id) would be throwing a unbound error? help? main.py import wx from customButton import customButton from wxPython.wx import * class MyFrame(wx.Frame): def __init__(self, parent, ID, title): wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(400, 400)) # Non-important code here... # This is the first declaration of the Button1 # This is also where the ERROR is thrown. # Omitting this line causes the window to execute # flawlessly. self.Button1 = customButton.__init__(self, parent, -1) # ... finishes in a basic wx.program style... customButton.py # I've included all of the code in the file # because have no idea where the bug/error happens import wx from wxPython.wx import * class Custom_Button(wx.PyControl): # The BMP's Over_bmp = None #wxEmptyBitmap(1,1,1) # When the mouse is over Norm_bmp = None #wxEmptyBitmap(1,1,1) # The normal BMP Push_bmp = None #wxEmptyBitmap(1,1,1) # The down BMP def __init__(self, parent, id, **kwargs): wx.PyControl.__init__(self,parent, id, **kwargs) # Set the BMP's to the ones given in the constructor #self.Over_bmp = wx.Bitmap(wx.Image(MOUSE_OVER_BMP, wx.BITMAP_TYPE_ANY).ConvertToBitmap()) #self.Norm_bmp = wx.Bitmap(wx.Image(NORM_BMP, wx.BITMAP_TYPE_ANY).ConvertToBitmap()) #self.Push_bmp = wx.Bitmap(wx.Image(PUSH_BMP, wx.BITMAP_TYPE_ANY).ConvertToBitmap()) #self.Pos_bmp = self.pos self.Bind(wx.EVT_LEFT_DOWN, self._onMouseDown) self.Bind(wx.EVT_LEFT_UP, self._onMouseUp) self.Bind(wx.EVT_LEAVE_WINDOW, self._onMouseLeave) self.Bind(wx.EVT_ENTER_WINDOW, self._onMouseEnter) self.Bind(wx.EVT_ERASE_BACKGROUND,self._onEraseBackground) self.Bind(wx.EVT_PAINT,self._onPaint) self._mouseIn = self._mouseDown = False def _onMouseEnter(self, event): self._mouseIn = True def _onMouseLeave(self, event): self._mouseIn = False def _onMouseDown(self, event): self._mouseDown = True def _onMouseUp(self, event): self._mouseDown = False self.sendButtonEvent() def sendButtonEvent(self): event = wx.CommandEvent(wx.wxEVT_COMMAND_BUTTON_CLICKED, self.GetId()) event.SetInt(0) event.SetEventObject(self) self.GetEventHandler().ProcessEvent(event) def _onEraseBackground(self,event): # reduce flicker pass def _onPaint(self, event): dc = wx.BufferedPaintDC(self) dc.SetFont(self.GetFont()) dc.SetBackground(wx.Brush(self.GetBackgroundColour())) dc.Clear() dc.DrawBitmap(self.Norm_bmp) # draw whatever you want to draw # draw glossy bitmaps e.g. dc.DrawBitmap if self._mouseIn: # If the Mouse is over the button dc.DrawBitmap(self, self.Mouse_over_bmp, self.Pos_bmp, useMask=False) if self._mouseDown: # If the Mouse clicks the button dc.DrawBitmap(self, self.Push_bmp, self.Pos_bmp, useMask=False)

    Read the article

  • Application Composer: Exposing Your Customizations in BI Analytics and Reporting

    - by Richard Bingham
    Introduction This article explains in simple terms how to ensure the customizations and extensions you have made to your Fusion Applications are available for use in reporting and analytics. It also includes four embedded demo videos from our YouTube channel (if they don't appear check the browser address bar for a blocking shield icon). If you are new to Business Intelligence consider first reviewing our getting started article, and you can read more about the topic of custom subject areas in the documentation book Extending Sales. There are essentially four sections to this post. First we look at how custom fields added to standard objects are made available for reporting. Secondly we look at creating custom subject areas on the standard objects. Next we consider reporting on custom objects, starting with simple standalone objects, then child custom objects, and finally custom objects with relationships. Finally this article reviews how flexfields are exposed for reporting. Whilst this article applies to both Cloud/SaaS and on-premises deployments, if you are an on-premises developer then you can also use the BI Administration Tool to customize your BI metadata repository (the RPD) and create new subject areas. Whilst this is not covered here you can read more in Chapter 8 of the Extensibility Guide for Developers. Custom Fields on Standard Objects If you add a custom field to your standard object then it's likely you'll want to include it in your reports. This is very simple, since all new fields are instantly available in the "[objectName] Extension" folder in existing subject areas. The following two minute video demonstrates this. Custom Subject Areas for Standard Objects You can create your own subject areas for use in analytics and reporting via Application Composer. An example use-case could be to simplify the seeded subject areas, since they sometimes contain complex data fields and internal values that could confuse business users. One thing to note is that you cannot create subject areas in a sandbox, as it is not supported by BI, so once your custom object is tested and complete you'll need to publish the sandbox before moving forwards. The subject area creation processes is essentially two-fold. Once the request is submitted the ADF artifacts are generated, then secondly the related metadata is sent to the BI presentation server API's to make the updates there. One thing to note is that this second step may take up to ten minutes to complete. Once finished the status of the custom subject area request should show as 'OK' and it is then ready for use. Within the creation processes wizard-like steps there are three concepts worth highlighting: Date Flattening - this feature permits the roll up of reports at various date levels, such as data by week, month, quarter, or year. You simply check the box to enable it for that date field. Measures - these are your own functions that you can build into the custom subject area. They are related to the field data type and include min-max for dates, and sum(), avg(), and count() for  numeric fields. Implicit Facts - used to make the BI metadata join between your object fields and the calculated measure fields. The advice is to choose the most frequently used measure to ensure consistency. This video shows a simple example, where a simplified subject area is created for the customer 'Contact' standard object, picking just a few fields upon which users can then create reports. Custom Objects Custom subject areas support three types of custom objects. First is a simple standalone custom object and for which the same process mentioned above applies. The next is a custom child object created on a standard object parent, and finally a custom object that is related to a parent object - usually through a dynamic choice list. Whilst the steps in each of these last two are mostly the same, there are differences in the way you choose the objects and their fields. This is illustrated in the videos below.The first video shows the process for creating a custom subject area for a simple standalone custom object. This second video demonstrates how to create custom subject areas for custom objects that are of parent:child type, as well as those those with dynamic-choice-list relationships. &lt;span id=&quot;XinhaEditingPostion&quot;&gt;&lt;/span&gt; Flexfields Dynamic and Extensible Flexfields satisfy a similar requirement as custom fields (for Application Composer), with flexfields common across the Fusion Financials, Supply Chain and Procurement, and HCM applications. The basic principle is when you enable and configure your flexfields, in the edit page under each segment region (for both global and context segments) there is a BI Enabled check box. Once this is checked and you've completed your configuration, you run the Scheduled Process job named 'Import Oracle Fusion Data Extensions for Transactional Business Intelligence' to generate and migrate the related BI artifacts and data. This applies for dynamic, key, and extensible flexfields. Of course there is more to consider in terms of how you wish your flexfields to be implemented and exposed in your reports, and details are given in Chapter 4 of the Extending Applications guide.

    Read the article

  • Draw simple circle in XNA

    - by George Johnston
    I want to draw a 2d, filled, circle. I've looked everywhere and cannot seem to find anything that will even remotely help me draw a circle. I simply want to specify a height and width and location on my canvas. Anyone know how? Thanks!

    Read the article

  • draw circle PIL - python

    - by ariel
    Hi I am looking for a command that will draw a circle on an existing image. im=Image.open(path) looking for a function that will draw a coloured circle with radious r and center(x,y) thanks for any help provided Ariel

    Read the article

  • How to draw a graph in LaTeX?

    - by Amir Rachum
    First of all, let me say I'm using LyX, though I have no problem using ERT. Secondly, what is the most simplest way to draw a simple graph like this in Latex? I've seen some documents with graphs and I've seen some examples, but I couldn't figure out how to just draw a simple graph - what packages do I need, etc?

    Read the article

  • Draw background for each cell in ObjectListField

    - by user315647
    Hi all, I am creating a blackberry apllication which pre-dominantly uses ObjectListFields..All i need now is to draw an image as a background for each cell. I know this is quiet possible but i am not getting hold of the procedure. if i draw bitmap in drawlistrow() function the bluehighlight gets into the background and the cell highlight becomes very hard to read......can anybody help me with a code snippet to get through this problem ....thanks...

    Read the article

  • Weird Overlay draw behaviour when zooming in the MapView [android]

    - by Itsik
    I've extended Overlay and implemented draw() in order to draw some stuff onto the map. When zooming is done through mapController.zoomIn() (called when doubleTapping the map), the overlay is drawn properly onto the map. BUT whenever I zoom in/out with the built in zoom controller, the overlay is not drawn properly and panning the map is needed to get the overlay refreshed.

    Read the article

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